61f3ca3cf850b7dfe9d6061e291f76eaba88de6b
[demo.git] / vnfs / DAaaS / operator / charts / prometheus-operator / templates / prometheus / servicemonitors.yaml
1 {{- if and .Values.prometheus.enabled .Values.prometheus.additionalServiceMonitors }}
2 apiVersion: v1
3 kind: List
4 items:
5 {{- range .Values.prometheus.additionalServiceMonitors }}
6   - apiVersion: {{ printf "%s/v1" ($.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }}
7     kind: ServiceMonitor
8     metadata:
9       name: {{ .name }}
10       labels:
11         app: {{ template "prometheus-operator.name" $ }}-prometheus
12 {{ include "prometheus-operator.labels" $ | indent 8 }}
13         {{- if .additionalLabels }}
14 {{ toYaml .additionalLabels | indent 8 }}
15         {{- end }}
16     spec:
17       endpoints:
18 {{ toYaml .endpoints | indent 8 }}
19     {{- if .jobLabel }}
20       jobLabel: {{ .jobLabel }}
21     {{- end }}
22     {{- if .namespaceSelector }}
23       namespaceSelector:
24 {{ toYaml .namespaceSelector | indent 8 }}
25     {{- end }}
26       selector:
27 {{ toYaml .selector | indent 8 }}
28 {{- end }}
29 {{- end }}