Skip to content

Commit

Permalink
[prometheus-blackbox-exporter] Allow mounting secret as pods env
Browse files Browse the repository at this point in the history
Signed-off-by: matthias lachevre <[email protected]>
  • Loading branch information
mlachevre-pass committed Nov 29, 2023
1 parent 2f23626 commit 2515cab
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/prometheus-blackbox-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
7 changes: 7 additions & 0 deletions charts/prometheus-blackbox-exporter/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
6 changes: 6 additions & 0 deletions charts/prometheus-blackbox-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2515cab

Please sign in to comment.