helm-charts/ntfy/templates/servicemonitor.yaml
2023-05-20 20:32:17 +02:00

17 lines
529 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 "ntfy.fullname" . }}
labels:
{{- include "ntfy.labels" . | nindent 4 }}
{{- toYaml .Values.prometheus.servicemonitor.labels | nindent 4 }}
spec:
endpoints:
- port: metrics
path: /metrics
selector:
matchLabels:
{{- include "ntfy.selectorLabels" . | nindent 6 }}
type: http
{{- end }}