Skip to content

Commit

Permalink
[prometheus-node-exporter] Add Support for Environment Variables for …
Browse files Browse the repository at this point in the history
…KubeRBACProxy Container (#4202)

* add support for env vars for kuberbacproxy container

Signed-off-by: Nicole <[email protected]>

* remove extra space in env braces

Signed-off-by: Nicole <[email protected]>

* rebase from main and change env var for krp to with from if

Signed-off-by: Nicole <[email protected]>

* update version

Signed-off-by: Nicole <[email protected]>

* syntax fix

Signed-off-by: Nicole <[email protected]>

---------

Signed-off-by: Nicole <[email protected]>
  • Loading branch information
nfrazier08 authored Feb 7, 2024
1 parent 7d561fa commit 56d3c33
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/prometheus-node-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords:
- prometheus
- exporter
type: application
version: 4.28.0
version: 4.29.0
appVersion: 1.7.0
home: https://github.com/prometheus/node_exporter/
sources:
Expand Down
7 changes: 7 additions & 0 deletions charts/prometheus-node-exporter/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,13 @@ spec:
terminationMessagePolicy: {{ .terminationMessagePolicy }}
{{- end }}
{{- end }}
{{- with .Values.kubeRBACProxy.env }}
env:
{{- range $key, $value := $.Values.kubeRBACProxy.env }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if .Values.kubeRBACProxy.containerSecurityContext }}
securityContext:
{{ toYaml .Values.kubeRBACProxy.containerSecurityContext | nindent 12 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/prometheus-node-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ global:
# The requests are served through the same service but requests are HTTPS.
kubeRBACProxy:
enabled: false
## Set environment variables as name/value pairs
env: {}
# VARIABLE: value
image:
registry: quay.io
repository: brancz/kube-rbac-proxy
Expand Down

0 comments on commit 56d3c33

Please sign in to comment.