From d1423484df737ee5c4e03735ecead07c779014da Mon Sep 17 00:00:00 2001 From: Yuwei Sung Date: Mon, 31 Jul 2023 09:38:45 -0500 Subject: [PATCH] add external labels to prometheus configmap --- .../pulsar/templates/prometheus/prometheus-configmap.yaml | 6 ++++++ charts/pulsar/values.yaml | 1 + 2 files changed, 7 insertions(+) diff --git a/charts/pulsar/templates/prometheus/prometheus-configmap.yaml b/charts/pulsar/templates/prometheus/prometheus-configmap.yaml index 62ad513d0..4463fce63 100644 --- a/charts/pulsar/templates/prometheus/prometheus-configmap.yaml +++ b/charts/pulsar/templates/prometheus/prometheus-configmap.yaml @@ -35,6 +35,12 @@ data: {{- if .Values.prometheus.scrapeTimeout }} scrape_timeout: {{ .Values.prometheus.scrapeTimeout }} {{- end }} +{{- if .Values.prometheus.external_labels }} + external_labels: + {{- with .Values.prometheus.external_labels }} + {{ toYaml . | indent 2 }} + {{- end }} +{{- end }} {{- if .Values.monitoring.alert_manager }} rule_files: - 'rules.yml' diff --git a/charts/pulsar/values.yaml b/charts/pulsar/values.yaml index 9b4260470..15c80e693 100644 --- a/charts/pulsar/values.yaml +++ b/charts/pulsar/values.yaml @@ -1568,6 +1568,7 @@ prometheus: ## retention: "15d" scrapeInterval: 15s + external_labels: {} securityContext: runAsUser: 65534 runAsNonRoot: true