Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
feat(metrics): add servicemonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
WrenIX committed Oct 26, 2023
1 parent 1178844 commit dd1e358
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
18 changes: 18 additions & 0 deletions templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if and .Values.prometheus.servicemonitor.enabled ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "mautrix-signal.fullname" . }}
labels:
{{- include "mautrix-signal.labels" . | nindent 4 }}
{{- with .Values.prometheus.servicemonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
endpoints:
- port: metrics
path: /metrics
selector:
matchLabels:
{{- include "mautrix-signal.selectorLabels" . | nindent 6 }}
{{- end }}
5 changes: 5 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -412,3 +412,8 @@ persistence:
size: 1Gi
## persistence.skipuninstall -- Do not delete the pvc upon helm uninstall
skipuninstall: false

prometheus:
servicemonitor:
enabled: false
labels: {}

0 comments on commit dd1e358

Please sign in to comment.