From 2515cabcf441988487dd0b7783860d891dc489c0 Mon Sep 17 00:00:00 2001 From: matthias lachevre Date: Thu, 19 Oct 2023 15:53:49 +0200 Subject: [PATCH] [prometheus-blackbox-exporter] Allow mounting secret as pods env Signed-off-by: matthias lachevre --- charts/prometheus-blackbox-exporter/Chart.yaml | 2 +- charts/prometheus-blackbox-exporter/templates/_helpers.tpl | 7 +++++++ charts/prometheus-blackbox-exporter/values.yaml | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/charts/prometheus-blackbox-exporter/Chart.yaml b/charts/prometheus-blackbox-exporter/Chart.yaml index 1192dc1bd2dd..df06f9fae5dd 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.6.1 +version: 8.7.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 530613b8fd4c..8e468ad1ccb1 100644 --- a/charts/prometheus-blackbox-exporter/templates/_helpers.tpl +++ b/charts/prometheus-blackbox-exporter/templates/_helpers.tpl @@ -168,6 +168,13 @@ containers: - name: {{ $key }} value: {{ $value | quote }} {{- end }} + {{- if .Values.extraEnvFromSecret }} + envFrom: + {{- range .Values.extraEnvFromSecret }} + - secretRef: + name: {{ . }} + {{- end }} + {{- end }} args: {{- if .Values.config }} {{- if .Values.configPath }} diff --git a/charts/prometheus-blackbox-exporter/values.yaml b/charts/prometheus-blackbox-exporter/values.yaml index 8606250c7e89..507831a5c172 100644 --- a/charts/prometheus-blackbox-exporter/values.yaml +++ b/charts/prometheus-blackbox-exporter/values.yaml @@ -31,6 +31,12 @@ automountServiceAccountToken: false ## NO_PROXY: "localhost,127.0.0.1" extraEnv: {} +## Additional blackbox-exporter container environment variables for secret +## extraEnvFromSecret: +## - secretOne +## - secretTwo +extraEnvFromSecret: "" + extraVolumes: [] # - name: secret-blackbox-oauth-htpasswd # secret: