helm-charts/mollysocket/templates/servicemonitor.yaml
2025-03-17 19:30:27 +01:00

18 lines
561 B
YAML

{{- if and .Values.prometheus.servicemonitor.enabled ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "mollysocket.fullname" . }}
labels:
{{- include "mollysocket.labels" . | nindent 4 }}
{{- with .Values.prometheus.servicemonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
endpoints:
- port: http
path: /metrics
selector:
matchLabels:
{{- include "mollysocket.selectorLabels" . | nindent 6 }}
{{- end }}