36 lines
998 B
YAML
36 lines
998 B
YAML
{{- 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 }}
|
|
|