From 8910e51ee2e69cb8955c6f7b1f08b9c4880a8ab1 Mon Sep 17 00:00:00 2001 From: Adrian Berger <43774417+adberger@users.noreply.github.com> Date: Mon, 22 Apr 2024 20:16:45 +0200 Subject: [PATCH] [prometheus-blackbox-exporter] fix: only template env if .Values.extraEnv is specified (#4354) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adrian Berger Signed-off-by: André Bauer Co-authored-by: André Bauer --- charts/prometheus-blackbox-exporter/Chart.yaml | 2 +- charts/prometheus-blackbox-exporter/templates/_helpers.tpl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/prometheus-blackbox-exporter/Chart.yaml b/charts/prometheus-blackbox-exporter/Chart.yaml index 94a22523a63d..420fffd67eb1 100644 --- a/charts/prometheus-blackbox-exporter/Chart.yaml +++ b/charts/prometheus-blackbox-exporter/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 description: Prometheus Blackbox Exporter name: prometheus-blackbox-exporter -version: 8.15.1 +version: 8.15.2 appVersion: v0.25.0 home: https://github.com/prometheus/blackbox_exporter sources: diff --git a/charts/prometheus-blackbox-exporter/templates/_helpers.tpl b/charts/prometheus-blackbox-exporter/templates/_helpers.tpl index 30039b893efc..4e28e55871bf 100644 --- a/charts/prometheus-blackbox-exporter/templates/_helpers.tpl +++ b/charts/prometheus-blackbox-exporter/templates/_helpers.tpl @@ -213,11 +213,13 @@ containers: securityContext: {{- toYaml . | nindent 4 }} {{- end }} + {{- if .Values.extraEnv }} env: {{- range $key, $value := .Values.extraEnv }} - name: {{ $key }} value: {{ $value | quote }} {{- end }} + {{- end }} {{- if .Values.extraEnvFromSecret }} envFrom: {{- range .Values.extraEnvFromSecret }}