47a911c62bb3c0ac433b3f957548b6c08a620920
[demo.git] / vnfs / DAaaS / collection / charts / prometheus / templates / servicemonitor.yaml
1 {{- if .Values.prometheus.additionalServiceMonitors }}
2 apiVersion: v1
3 kind: List
4 items:
5 {{- range .Values.prometheus.additionalServiceMonitors }}
6   - apiVersion: "monitoring.coreos.com/v1"
7     kind: ServiceMonitor
8     metadata:
9       name: {{ .name }}
10       labels:
11         app: {{ template "prometheus.name" $ }}-prometheus
12 {{ include "prometheus.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 }}