Skip to content

Commit

Permalink
feat: allow specifying arbitrary envFrom in values.yaml (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
hspitzley-czi authored Jun 7, 2024
1 parent 9ffd57b commit 0598c79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion stack/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Create the name of the service account to use
{{- end }}

{{- define "service.configuration" -}}
{{- if or (or (or (ne (trim .Values.appSecrets.envSecret.secretName) "") (ne (trim .Values.appSecrets.envSecret.secretName) "")) (ne (trim .Values.appContext.envContextConfigMapName) "")) (ne (trim .Values.appContext.stackContextConfigMapName) "") -}}
{{- if or (or (or (or (ne (trim .Values.appSecrets.envSecret.secretName) "") (ne (trim .Values.appSecrets.envSecret.secretName) "")) (ne (trim .Values.appContext.envContextConfigMapName) "")) (ne (trim .Values.appContext.stackContextConfigMapName) "")) .Values.envFrom -}}
envFrom:
{{- if ne (trim .Values.appSecrets.envSecret.secretName) "" }}
- secretRef:
Expand All @@ -106,6 +106,9 @@ envFrom:
name: {{ .Values.appContext.stackContextConfigMapName }}
optional: true
{{- end }}
{{- if .Values.envFrom }}
{{ toYaml .Values.envFrom }}
{{- end }}
{{- end }}
{{- end }}

Expand Down
1 change: 1 addition & 0 deletions stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ global:
topologySpreadConstraints: []

env: []
envFrom: []

# Service overrides
services: {}
Expand Down

0 comments on commit 0598c79

Please sign in to comment.