helm-charts/ntfy/templates/servicemonitor.yaml

18 lines
529 B
YAML
Raw Normal View History

2023-05-20 19:34:37 +02:00
{{- 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 }}