aboutsummaryrefslogtreecommitdiffstats
path: root/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/exporters/core-dns/servicemonitor.yaml
blob: fa3ad9cd71149cb4f87fd5e7d33eaec3030c84d5 (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
31
32
33
{{- if .Values.coreDns.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: {{ template "prometheus-operator.fullname" . }}-coredns
  namespace: {{ template "prometheus-operator.namespace" . }}
  labels:
    app: {{ template "prometheus-operator.name" . }}-coredns
{{ include "prometheus-operator.labels" . | indent 4 }}
spec:
  jobLabel: jobLabel
  selector:
    matchLabels:
      app: {{ template "prometheus-operator.name" . }}-coredns
      release: {{ $.Release.Name | quote }}
  namespaceSelector:
    matchNames:
      - "kube-system"
  endpoints:
  - port: http-metrics
    {{- if .Values.coreDns.serviceMonitor.interval}}
    interval: {{ .Values.coreDns.serviceMonitor.interval }}
    {{- end }}
    bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
{{- if .Values.coreDns.serviceMonitor.metricRelabelings }}
    metricRelabelings:
{{ tpl (toYaml .Values.coreDns.serviceMonitor.metricRelabelings | indent 4) . }}
{{- end }}
{{- if .Values.coreDns.serviceMonitor.relabelings }}
    relabelings:
{{ toYaml .Values.coreDns.serviceMonitor.relabelings | indent 4 }}
{{- end }}
{{- end }}