ckotzbauer_helm-charts/charts/vulnerability-operator/templates/servicemonitor.yaml

28 lines
826 B
YAML

{{ if .Values.servicemonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "app.name" . }}
labels:
{{- include "app.labels" . | nindent 4 }}
{{- toYaml .Values.servicemonitor.additionalLabels | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "app.selectorLabels" . | nindent 6 }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
endpoints:
- path: /metrics
port: http
{{- if .Values.servicemonitor.relabelings }}
relabelings:
{{- toYaml .Values.servicemonitor.relabelings | nindent 8 }}
{{- end -}}
{{- if .Values.servicemonitor.metricRelabelings }}
metricRelabelings:
{{- toYaml .Values.servicemonitor.metricRelabelings | nindent 8 }}
{{- end -}}
{{- end -}}