Skip to content

Commit

Permalink
feat(helm) env value to deployment and deamonset
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrrotter committed Jan 9, 2024
1 parent 33dd533 commit c0f936b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{{- range $dsName, $dsDef := . }}
{{- $extraVolumes := concat ( default $.Values.hostPathsExporter.extraVolumes $dsDef.extraVolumes ) $.Values.extraVolumes }}
{{- $extraVolumeMounts := concat ( default $.Values.hostPathsExporter.extraVolumeMounts $dsDef.extraVolumeMounts ) $.Values.extraVolumeMounts }}
{{- $extraEnvs := concat (default (list) $.Values.hostPathsExporter.env) (default (list) $dsDef.env) }}
---
apiVersion: apps/v1
kind: DaemonSet
Expand Down Expand Up @@ -70,6 +71,10 @@ spec:
{{- end }}
image: {{ include "x509-certificate-exporter.image" $ }}
imagePullPolicy: {{ $.Values.image.pullPolicy }}
{{- if $extraEnvs }}
env:
{{- toYaml $extraEnvs | trim | nindent 8 }}
{{- end }}
args:
{{- with default $.Values.hostPathsExporter.debugMode $dsDef.debugMode }}
- --debug
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ spec:
readOnly: true
{{- end }}
{{- end }}
{{- if .Values.secretsExporter.env }}
env:
{{- toYaml .Values.secretsExporter.env | trim | nindent 8 }}
{{- end }}
args:
{{- if .Values.secretsExporter.debugMode }}
- --debug
Expand Down
10 changes: 10 additions & 0 deletions deploy/charts/x509-certificate-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ secretsExporter:
# -- Maximum time an object can stay in cache unrefreshed (seconds) - it will be at least half of that
maxDuration: 300

# -- Additional environment variables for container
env: []
#- name: GOMAXPROCS
# value: "1"

hostPathsExporter:
# -- Should debug messages be produced by hostPath exporters (default for all hostPathsExporter.daemonSets)
debugMode: false
Expand Down Expand Up @@ -180,6 +185,11 @@ hostPathsExporter:
# -- [SEE README] List of Kubeconf file paths of the host to scan for embedded certificates to export metrics about
watchKubeconfFiles: []

# -- Additional environment variables for container
env: []
#- name: GOMAXPROCS
# value: "1"

# -- [SEE README] Map to define one or many DaemonSets running hostPath exporters. Key is used as a name ; value is a map to override all default settings set by `hostPathsExporter.*`.
daemonSets: {}

Expand Down

0 comments on commit c0f936b

Please sign in to comment.