Skip to content

Commit

Permalink
feat: ability to mount pre created configmaps and secrets via envFrom (
Browse files Browse the repository at this point in the history
…#27)


Co-authored-by: Kaur Kallas <[email protected]>
  • Loading branch information
koorikla and Kaur Kallas authored Feb 6, 2024
1 parent c98ec7f commit 514ce9c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
21 changes: 21 additions & 0 deletions charts/kestra/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,27 @@ spec:
env:
{{- if $.Values.extraEnv }}{{ toYaml $.Values.extraEnv | trim | nindent 12 }}{{ end }}
{{- include "kestra.configurationPath" $ | nindent 12 }}
{{- if or .Values.extraConfigMapEnvFrom .Values.extraSecretEnvFrom }}
envFrom:
{{- end }}
{{- with .Values.extraConfigMapEnvFrom }}
{{- range . }}
- configMapRef:
name: {{ .name }}
{{- if .prefix }}
prefix: {{ .prefix }}
{{- end }}
{{- end }}
{{- end }}
{{- with .Values.extraSecretEnvFrom }}
{{- range . }}
- secretRef:
name: {{ .name }}
{{- if .prefix }}
prefix: {{ .prefix }}
{{- end }}
{{- end }}
{{- end }}
volumeMounts:
{{- if $.Values.extraVolumeMounts }}{{ toYaml $.Values.extraVolumeMounts | trim | nindent 12 }}{{ end }}
{{- if $.Values.configuration }}
Expand Down
13 changes: 13 additions & 0 deletions charts/kestra/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,19 @@ extraEnv: []

extraContainers: []


# https://kestra.io/docs/administrator-guide/configuration/others#kestravariablesenv-vars-prefix
extraConfigMapEnvFrom:
# - name: my-existing-configmap-no-prefix
# - name: my-existing-configmap-with-prefix
# prefix: KESTRA_

extraSecretEnvFrom:
# - name: my-existing-no-prefix
# - name: my-existing-with-prefix
# prefix: SECRET_


podSecurityContext: {}
# fsGroup: 2000

Expand Down

0 comments on commit 514ce9c

Please sign in to comment.