helm-charts/headscale/templates/servicemonitor.yaml
2023-07-24 21:51:14 +02:00

21 lines
647 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 "headscale.fullname" . }}
labels:
{{- include "headscale.labels" . | nindent 4 }}
{{- with .Values.prometheus.servicemonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
endpoints:
- port: metrics
path: /metrics
{{- if .Values.headscale.certmanager.enabled }}
scheme: https
{{- end }}
selector:
matchLabels:
{{- include "headscale.selectorLabels" . | nindent 6 }}
{{- end }}