github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/prometheus-community/kube-prometheus-stack/templates/prometheus/additionalScrapeConfigs.yaml (about)

     1  {{- if and .Values.prometheus.enabled .Values.prometheus.prometheusSpec.additionalScrapeConfigs }}
     2  apiVersion: v1
     3  kind: Secret
     4  metadata:
     5    name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus-scrape-confg
     6    namespace: {{ template "kube-prometheus-stack.namespace" . }}
     7  {{- if .Values.prometheus.prometheusSpec.additionalPrometheusSecretsAnnotations }}
     8    annotations:
     9  {{ toYaml .Values.prometheus.prometheusSpec.additionalPrometheusSecretsAnnotations | indent 4 }}
    10  {{- end }}
    11    labels:
    12      app: {{ template "kube-prometheus-stack.name" . }}-prometheus-scrape-confg
    13  {{ include "kube-prometheus-stack.labels" . | indent 4 }}
    14  data:
    15  {{- if  eq ( typeOf .Values.prometheus.prometheusSpec.additionalScrapeConfigs ) "string" }}
    16    additional-scrape-configs.yaml: {{ tpl .Values.prometheus.prometheusSpec.additionalScrapeConfigs $ | b64enc | quote }}
    17  {{- else }}
    18    additional-scrape-configs.yaml: {{ tpl (toYaml .Values.prometheus.prometheusSpec.additionalScrapeConfigs) $ | b64enc | quote }}
    19  {{- end }}
    20  {{- end }}