28 lines
729 B
YAML
28 lines
729 B
YAML
|
{{- if and .Values.prometheus.servicemonitor.enabled }}
|
||
|
apiVersion: monitoring.coreos.com/v1
|
||
|
kind: ServiceMonitor
|
||
|
metadata:
|
||
|
name: {{ include "paperless-ngx.fullname" . }}
|
||
|
labels:
|
||
|
{{- include "paperless-ngx.labels" . | nindent 4 }}
|
||
|
{{- with .Values.prometheus.servicemonitor.labels }}
|
||
|
{{- toYaml . | nindent 4 }}
|
||
|
{{- end }}
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
{{- include "paperless-ngx.selectorLabels" . | nindent 6 }}
|
||
|
endpoints:
|
||
|
- port: metrics
|
||
|
path: "/metrics"
|
||
|
{{- with .Values.prometheus.servicemonitor }}
|
||
|
{{- with .interval }}
|
||
|
interval: {{ . }}
|
||
|
{{- end }}
|
||
|
{{- with .scrapeTimeout }}
|
||
|
scrapeTimeout: {{ . }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
|