github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/prometheus-community/kube-prometheus-stack/templates/prometheus/podmonitors.yaml (about) 1 {{- if and .Values.prometheus.enabled .Values.prometheus.additionalPodMonitors }} 2 apiVersion: v1 3 kind: List 4 items: 5 {{- range .Values.prometheus.additionalPodMonitors }} 6 - apiVersion: monitoring.coreos.com/v1 7 kind: PodMonitor 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 podMetricsEndpoints: 20 {{ toYaml .podMetricsEndpoints | 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 .podTargetLabels }} 31 podTargetLabels: 32 {{ toYaml .podTargetLabels | indent 8 }} 33 {{- end }} 34 {{- if .sampleLimit }} 35 sampleLimit: {{ .sampleLimit }} 36 {{- end }} 37 {{- end }} 38 {{- end }}