Skip to content

Commit

Permalink
feat(chart): allow valueFrom in env config of components (apache#40095)
Browse files Browse the repository at this point in the history
  • Loading branch information
dada-engineer committed Jun 8, 2024
1 parent 27579cb commit 1666c0d
Show file tree
Hide file tree
Showing 2 changed files with 317 additions and 16 deletions.
13 changes: 13 additions & 0 deletions chart/templates/_helpers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,20 @@ capabilities:
{{- $env := index . 1 -}}
{{- range $i, $config := $env }}
- name: {{ $config.name }}
{{- if $config.value }}
value: {{ $config.value | quote }}
{{- else if $config.valueFrom }}
valueFrom:
{{- if $config.valueFrom.secretKeyRef }}
secretKeyRef:
name: {{ $config.valueFrom.secretKeyRef.name }}
key: {{ $config.valueFrom.secretKeyRef.key }}
{{- else if $config.valueFrom.configMapKeyRef }}
configMapKeyRef:
name: {{ $config.valueFrom.configMapKeyRef.name }}
key: {{ $config.valueFrom.configMapKeyRef.key }}
{{- end }}
{{- end }}
{{- if or (eq $.Values.executor "KubernetesExecutor") (eq $.Values.executor "LocalKubernetesExecutor") (eq $.Values.executor "CeleryKubernetesExecutor") }}
- name: AIRFLOW__KUBERNETES_ENVIRONMENT_VARIABLES__{{ $config.name }}
value: {{ $config.value | quote }}
Expand Down
Loading

0 comments on commit 1666c0d

Please sign in to comment.