From 864eda36ee77e4c70c3bb6222f6886d852cda763 Mon Sep 17 00:00:00 2001 From: Adrian Berger Date: Mon, 11 Mar 2024 11:23:07 +0100 Subject: [PATCH] [prometheus-blackbox-exporter] fix: only template env if .Values.extraEnv is specified Signed-off-by: Adrian Berger --- 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 e0a822d9d945..0f3e47d3fb2f 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.12.0 +version: 8.12.1 appVersion: v0.24.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 7eab07ff31d8..bd5d4904c0c0 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 }}