aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/collection/charts/prometheus/templates/servicemonitor.yaml
blob: ea2b81b621e86fd70ad9173a5d9e2522f4caa558 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{{- if .Values.prometheus.additionalServiceMonitors }}
apiVersion: v1
kind: List
items:
{{- range .Values.prometheus.additionalServiceMonitors }}
  - apiVersion: "monitoring.coreos.com/v1"
    kind: ServiceMonitor
    metadata:
      name: {{ .name }}
      "helm.sh/hook": post-install
      "helm.sh/hook-weight": "1"
      labels:
        app: {{ template "prometheus.name" $ }}-prometheus
{{ include "prometheus.labels" $ | indent 8 }}
        {{- if .additionalLabels }}
{{ toYaml .additionalLabels | indent 8 }}
        {{- end }}
    spec:
      endpoints:
{{ toYaml .endpoints | indent 8 }}
    {{- if .jobLabel }}
      jobLabel: {{ .jobLabel }}
    {{- end }}
      namespaceSelector:
        matchNames:
          - {{ $.Release.Namespace | quote }}
      selector:
{{ toYaml .selector  | indent 8  }}  release: {{ $.Release.Name | quote }}
{{- end }}
{{- end }}