Skip to content

Commit

Permalink
[prometheus-snmp-exporter] Allow setting environment variables via en…
Browse files Browse the repository at this point in the history
…vFrom (#4441)

* Allow setting environment variables

- Add optional envFrom sections to DaemonSet and Deployment

Signed-off-by: Karsten Stöckmann <karsten.stoeckmann@bewotec.de>

* Add example for envFrom

Signed-off-by: Karsten Stöckmann <karsten.stoeckmann@bewotec.de>

---------

Signed-off-by: Karsten Stöckmann <karsten.stoeckmann@bewotec.de>
Co-authored-by: Karsten Stöckmann <karsten.stoeckmann@bewotec.de>
  • Loading branch information
ngc4579 and Karsten Stöckmann committed Apr 14, 2024
1 parent 1d13b15 commit 742559f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/prometheus-snmp-exporter/Chart.yaml
@@ -1,7 +1,7 @@
apiVersion: v1
description: Prometheus SNMP Exporter
name: prometheus-snmp-exporter
version: 5.1.0
version: 5.1.1
appVersion: v0.25.0
home: https://github.com/prometheus/snmp_exporter
sources:
Expand Down
4 changes: 4 additions & 0 deletions charts/prometheus-snmp-exporter/templates/daemonset.yaml
Expand Up @@ -46,6 +46,10 @@ spec:
{{- if .Values.extraArgs }}
{{ toYaml .Values.extraArgs | indent 12 }}
{{- end }}
{{- if .Values.envFrom }}
envFrom:
{{- toYaml .Values.envFrom | nindent 12 }}
{{- end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
ports:
Expand Down
4 changes: 4 additions & 0 deletions charts/prometheus-snmp-exporter/templates/deployment.yaml
Expand Up @@ -53,6 +53,10 @@ spec:
{{- if .Values.extraArgs }}
{{ toYaml .Values.extraArgs | indent 12 }}
{{- end }}
{{- if .Values.envFrom }}
envFrom:
{{- toYaml .Values.envFrom | nindent 12 }}
{{- end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
ports:
Expand Down
4 changes: 4 additions & 0 deletions charts/prometheus-snmp-exporter/values.yaml
Expand Up @@ -127,6 +127,10 @@ podAnnotations: {}
extraArgs: []
# --history.limit=1000

envFrom: []
# - secretRef:
# name: name-of-secret

replicas: 1
## Monitors ConfigMap changes and POSTs to a URL
## Ref: https://github.com/jimmidyson/configmap-reload
Expand Down

0 comments on commit 742559f

Please sign in to comment.