Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
- 'config/'
env:
DOCKER_FILE_PATH: Dockerfile
GOLANG_VERSION: 1.21
HELM_VERSION: v3.8.2
REGISTRY: ghcr.io

Expand All @@ -30,12 +29,12 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOLANG_VERSION }}
go-version-file: go.mod

- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.54
version: v1.64
only-new-issues: false
args: --timeout 10m

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/pull_request_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ on:

env:
KIND_VERSION: "v0.25.0"
GOLANG_VERSION: 1.21

jobs:

Expand All @@ -37,7 +36,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOLANG_VERSION }}
go-version-file: go.mod

- name: Install kind
uses: engineerd/setup-kind@v0.5.0
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ on:
env:
DOCKER_FILE_PATH: Dockerfile
BUNDLE_DOCKER_FILE_PATH: bundle.Dockerfile
GOLANG_VERSION: 1.22
OPERATOR_SDK_VERSION: "1.39.2"
KUSTOMIZE_VERSION: "5.4.3"
KUBERNETES_VERSION: "1.23.5"
Expand All @@ -39,12 +38,12 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOLANG_VERSION }}
go-version-file: go.mod

- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.54
version: v1.64
only-new-issues: false
args: --timeout 10m

Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
tags:
- "v*"

env:
GOLANG_VERSION: 1.21

jobs:
build:
name: GoReleaser build
Expand All @@ -22,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOLANG_VERSION }}
go-version-file: go.mod

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@master
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.22 AS builder
FROM golang:1.24 AS builder
Comment thread
Felix-Stakater marked this conversation as resolved.

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ IMG ?= stakater/ingressmonitorcontroller:v2.2.4
# GOLANGCI_LINT env
GOLANGCI_LINT = _output/tools/golangci-lint
GOLANGCI_LINT_CACHE = $(PWD)/_output/golangci-lint-cache
GOLANGCI_LINT_VERSION = v1.39.0
GOLANGCI_LINT_VERSION = v1.64.0

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down Expand Up @@ -216,7 +216,7 @@ rm -f $(1) || true ;\
GOBIN=$(LOCALBIN) go install $${package} ;\
mv $(1) $(1)-$(3) ;\
} ;\
ln -sf $(1)-$(3) $(1)
ln -sf $(1)-$(3) $(1)
endef

.PHONY: bundle
Expand Down
3 changes: 2 additions & 1 deletion charts/ingressmonitorcontroller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ helm install stakater/ingressmonitorcontroller
## Chart Values

| Key | Default | Description |
| ---------------------------- | ------------------------------------- | ---------------------------------------------------------------------------------------------- |
|------------------------------|---------------------------------------|------------------------------------------------------------------------------------------------|
| global.labels | `` | Labels to be added to all components |
| replicaCount | `1` | Replicas for operator |
| image.name | `"stakater/ingressmonitorcontroller"` | Image repository |
Expand All @@ -44,6 +44,7 @@ helm install stakater/ingressmonitorcontroller
| serviceAccount.annotations | `{}` | Additional annotations on ServiceAccount |
| serviceMonitor.enabled | `false` | Create ServiceMonitor for metrics |
| podAnnotations | `""` | Additional annotations on deployment |
| podLabels | `{}` | Additional labels for the Pod template |
| resources | `{}` | Requests/Limits for operator |
| securityContext | `{}` | Override for SecurityContext |
| podSecurityContext | `{}` | Override for deployment.Spec.securityContext |
Expand Down
7 changes: 5 additions & 2 deletions charts/ingressmonitorcontroller/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8}}
{{- end }}
{{- include "ingress-monitor-controller.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
Expand Down Expand Up @@ -69,7 +72,7 @@ spec:
resources:
{{- toYaml .Values.resources | nindent 10 }}
securityContext:
{{- toYaml .Values.securityContext | nindent 10 }}
{{- toYaml .Values.securityContext | nindent 10 }}
terminationGracePeriodSeconds: 10
{{- with .Values.nodeSelector }}
nodeSelector:
Expand All @@ -83,4 +86,4 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
---
---
2 changes: 2 additions & 0 deletions charts/ingressmonitorcontroller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ resources:

deploymentAnnotations: {}

podLabels: {}

podAnnotations: {}

podSecurityContext:
Expand Down
28 changes: 24 additions & 4 deletions docs/appinsights-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,30 @@ You can configure Application Insights as a Ingress Monitor by using below confi
| name | Name of the provider (e.g. AppInsights) |
| appInsightsConfig | `appInsightsConfig` is the configuration specific to Appinsights Instance as mentioned below: |

## Authentication

The AppInsights monitor uses [azure-sdk-for-go](https://github.com/Azure/azure-sdk-for-go) to authenticate and communicate to the Azure API.

> The [DefaultAzureCredential](https://learn.microsoft.com/en-us/azure/developer/go/sdk/authentication/credential-chains#defaultazurecredential-overview) is an opinionated, preconfigured chain of credentials.
> It's designed to support many environments, along with the most common authentication flows and developer tools. In graphical form, the underlying chain looks like this:

It will automatically configure authentication in the following order, stopping when it finds a hit:

* Environment Variables
* Workload Identity
* Managed Identity
* Azure CLI
* Azure Developer CLI

Refer to the [DefaultAzureCredential documentation](https://learn.microsoft.com/en-us/azure/developer/go/sdk/authentication/credential-chains#defaultazurecredential-overview) for more details.


## Appinsights Configuration:

| Key | Description |
| ------------------------ | -------------------------------------------------------------------------------------------------------------- |
|--------------------------|----------------------------------------------------------------------------------------------------------------|
| name | Name of the Appinsights Instance |
| subscriptionId | The Azure Subscription ID |
| resourceGroup | Resource group of Appinsights |
| location | The location of the resource group. |
| geoLocation | Location ID for the webtest to run from. For example: `["us-tx-sn1-azr", "us-il-ch1-azr"]` |
Expand All @@ -33,8 +52,9 @@ You can configure Application Insights as a Ingress Monitor by using below confi
providers:
- name: AppInsights
appInsightsConfig:
name: demo-appinsights
resourceGroup: demoRG
name: "demo-appinsighs"
subscriptionId: "12345678-1234-1234-1234-123456789012"
resourceGroup: "demoRG"
location: "westeurope"
geoLocation:
[
Expand All @@ -47,7 +67,7 @@ providers:
send_to_service_owners: false
custom_emails: ["mail@cizer.dev"]
webhookAction:
service_uri: http://myalert-webhook.io
service_uri: "http://myalert-webhook.io"
enableMonitorDeletion: true
```

Expand Down
42 changes: 18 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
module github.com/stakater/IngressMonitorController/v2

go 1.22.0
go 1.24.0

require (
cloud.google.com/go/monitoring v1.16.3
github.com/Azure/azure-sdk-for-go v44.0.0+incompatible
github.com/Azure/go-autorest/autorest/azure/auth v0.5.0
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights v1.2.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.11.0
github.com/StatusCakeDev/statuscake-go v1.3.0
github.com/antoineaugusti/updown v0.0.0-20190412074625-d590ab97f115
github.com/go-logr/logr v1.4.2
github.com/google/go-cmp v0.6.0
github.com/grafana/synthetic-monitoring-agent v0.19.4
github.com/grafana/synthetic-monitoring-api-go-client v0.8.0
github.com/karlderkaefer/pingdom-golang-client v1.0.4
github.com/kelseyhightower/envconfig v1.4.0
github.com/openshift/api v0.0.0-20200526144822-34f54f12813a
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/russellcardullo/go-pingdom v1.3.0
github.com/stakater/operator-utils v0.1.13
github.com/stretchr/testify v1.9.0
github.com/stretchr/testify v1.10.0
golang.org/x/time v0.3.0
google.golang.org/api v0.149.0
google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697
Expand All @@ -31,23 +33,15 @@ require (

require (
cloud.google.com/go/compute/metadata v0.5.0 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.18 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.24 // indirect
github.com/Azure/go-autorest/autorest/azure/cli v0.4.0 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect
github.com/Azure/go-autorest/autorest/validation v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dimchansky/utfbom v1.1.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
Expand All @@ -60,12 +54,11 @@ require (
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
github.com/golang-jwt/jwt/v5 v5.2.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/cel-go v0.20.1 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/uuid v1.6.0 // indirect
Expand All @@ -76,11 +69,12 @@ require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
Expand All @@ -102,14 +96,14 @@ require (
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/crypto v0.38.0 // indirect
golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/net v0.40.0 // indirect
golang.org/x/oauth2 v0.22.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.33.0 // indirect
golang.org/x/term v0.32.0 // indirect
golang.org/x/text v0.25.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241113202542-65e8d215514f // indirect
Expand Down
Loading