diff --git a/CHANGELOG.md b/CHANGELOG.md index 6874d03a..44d3dc7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Use ServiceMonitor for monitoring. + ## [4.6.0] - 2024-01-17 ### Changed diff --git a/helm/etcd-backup-operator/Chart.yaml b/helm/etcd-backup-operator/Chart.yaml index 5559a2a6..dd4fc699 100644 --- a/helm/etcd-backup-operator/Chart.yaml +++ b/helm/etcd-backup-operator/Chart.yaml @@ -5,5 +5,5 @@ home: "https://github.com/giantswarm/etcd-backup-operator" version: "[[ .Version ]]" appVersion: "[[ .AppVersion ]]" annotations: - application.giantswarm.io/team: team-turtles + application.giantswarm.io/team: turtles config.giantswarm.io/version: 1.x.x diff --git a/helm/etcd-backup-operator/templates/_helpers.tpl b/helm/etcd-backup-operator/templates/_helpers.tpl index efc78c83..40b8c442 100644 --- a/helm/etcd-backup-operator/templates/_helpers.tpl +++ b/helm/etcd-backup-operator/templates/_helpers.tpl @@ -21,6 +21,7 @@ app: {{ include "name" . | quote }} {{ include "labels.selector" . }} application.giantswarm.io/branch: {{ .Values.project.branch | quote }} application.giantswarm.io/commit: {{ .Values.project.commit | quote }} +application.giantswarm.io/team: {{ index .Chart.Annotations "application.giantswarm.io/team" | quote }} app.kubernetes.io/managed-by: {{ .Release.Service | quote }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} helm.sh/chart: {{ include "chart" . | quote }} diff --git a/helm/etcd-backup-operator/templates/service-monitor.yaml b/helm/etcd-backup-operator/templates/service-monitor.yaml new file mode 100644 index 00000000..e6e2fab5 --- /dev/null +++ b/helm/etcd-backup-operator/templates/service-monitor.yaml @@ -0,0 +1,13 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + {{- include "labels.common" . | nindent 4 }} + name: {{ include "resource.default.name" . }} + namespace: {{ include "resource.default.namespace" . }} +spec: + endpoints: + - port: metrics + selector: + matchLabels: + {{- include "labels.selector" . | nindent 6}} diff --git a/helm/etcd-backup-operator/templates/service.yaml b/helm/etcd-backup-operator/templates/service.yaml index c8a19396..83183e85 100644 --- a/helm/etcd-backup-operator/templates/service.yaml +++ b/helm/etcd-backup-operator/templates/service.yaml @@ -5,9 +5,6 @@ metadata: namespace: {{ include "resource.default.namespace" . }} labels: {{- include "labels.common" . | nindent 4 }} - giantswarm.io/monitoring: "true" - annotations: - prometheus.io/scrape: "true" spec: ports: - name: metrics diff --git a/helm/etcd-backup-operator/values.yaml b/helm/etcd-backup-operator/values.yaml index 5a5ec735..a4c1477c 100644 --- a/helm/etcd-backup-operator/values.yaml +++ b/helm/etcd-backup-operator/values.yaml @@ -6,12 +6,13 @@ pod: id: 1000 group: id: 1000 -service: - port: 8050 project: branch: "[[ .Branch ]]" commit: "[[ .SHA ]]" +service: + port: 8050 + registry: domain: gsoci.azurecr.io