Skip to content

Commit

Permalink
Use service monitor (#562)
Browse files Browse the repository at this point in the history
* Use pod monitor

* set service.port back
  • Loading branch information
QuentinBisson committed Apr 1, 2024
1 parent 9ace445 commit fa5104f
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm/etcd-backup-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions helm/etcd-backup-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
13 changes: 13 additions & 0 deletions helm/etcd-backup-operator/templates/service-monitor.yaml
Original file line number Diff line number Diff line change
@@ -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}}
3 changes: 0 additions & 3 deletions helm/etcd-backup-operator/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions helm/etcd-backup-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit fa5104f

Please sign in to comment.