Collectd operator utilties
[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       "helm.sh/hook": post-install
11       "helm.sh/hook-weight": "1"
12       labels:
13         app: {{ template "prometheus.name" $ }}-prometheus
14 {{ include "prometheus.labels" $ | indent 8 }}
15         {{- if .additionalLabels }}
16 {{ toYaml .additionalLabels | indent 8 }}
17         {{- end }}
18     spec:
19       endpoints:
20 {{ toYaml .endpoints | indent 8 }}
21     {{- if .jobLabel }}
22       jobLabel: {{ .jobLabel }}
23     {{- end }}
24       namespaceSelector:
25         matchNames:
26           - {{ $.Release.Namespace | quote }}
27       selector:
28 {{ toYaml .selector  | indent 8  }}  release: {{ $.Release.Name | quote }}
29 {{- end }}
30 {{- end }}