github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/prometheus-community/kube-prometheus-stack/templates/prometheus/servicemonitors.yaml (about) 1 {{- if and .Values.prometheus.enabled .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 namespace: {{ template "kube-prometheus-stack.namespace" $ }} 11 labels: 12 app: {{ template "kube-prometheus-stack.name" $ }}-prometheus 13 {{ include "kube-prometheus-stack.labels" $ | indent 8 }} 14 {{- if .additionalLabels }} 15 {{ toYaml .additionalLabels | indent 8 }} 16 {{- end }} 17 spec: 18 {{- include "servicemonitor.scrapeLimits" . | nindent 6 }} 19 endpoints: 20 {{ toYaml .endpoints | indent 8 }} 21 {{- if .jobLabel }} 22 jobLabel: {{ .jobLabel }} 23 {{- end }} 24 {{- if .namespaceSelector }} 25 namespaceSelector: 26 {{ toYaml .namespaceSelector | indent 8 }} 27 {{- end }} 28 selector: 29 {{ toYaml .selector | indent 8 }} 30 {{- if .targetLabels }} 31 targetLabels: 32 {{ toYaml .targetLabels | indent 8 }} 33 {{- end }} 34 {{- if .podTargetLabels }} 35 podTargetLabels: 36 {{ toYaml .podTargetLabels | indent 8 }} 37 {{- end }} 38 {{- end }} 39 {{- end }}