helm-charts/pretix/templates/servicemonitor.yaml

37 lines
998 B
YAML
Raw Permalink Normal View History

2024-12-12 22:33:45 +01:00
{{- if and .Values.prometheus.servicemonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "pretix.fullname" . }}
labels:
{{- include "pretix.labels" . | nindent 4 }}
{{- with .Values.prometheus.servicemonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
{{- include "pretix.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: web
endpoints:
- port: http
path: "/metrics"
enableHttp2: false
basicAuth:
username:
name: {{ include "pretix.fullname" . }}
key: PRETIX_METRICS_USER
password:
name: {{ include "pretix.fullname" . }}
key: PRETIX_METRICS_PASSPHRASE
{{- with .Values.prometheus.servicemonitor }}
{{- with .interval }}
interval: {{ . }}
{{- end }}
{{- with .scrapeTimeout }}
scrapeTimeout: {{ . }}
{{- end }}
{{- end }}
{{- end }}