Skip to content

Commit 711e80a

Browse files
committed
Allow .Values.flyte.common.databaseSecret.name to reference Helm
template value This adds support for the ability to set `.Values.flyte.common.databaseSecret.name` to a Helm template value. e.g. `.Values.global.MY_SECRET_NAME` Signed-off-by: Mike Hotan <[email protected]>
1 parent 74d9e86 commit 711e80a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

charts/flyte-core/templates/_helpers.tpl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,19 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
175175
# Optional blocks for secret mount
176176

177177
{{- define "databaseSecret.volume" -}}
178-
{{- with .Values.common.databaseSecret.name -}}
179-
- name: {{ . }}
178+
{{- $secretName := tpl (.Values.flyte.common.databaseSecret.name | default "") . -}}
179+
{{- if $secretName }}
180+
- name: {{ $secretName }}
180181
secret:
181-
secretName: {{ . }}
182+
secretName: {{ $secretName }}
182183
{{- end }}
183184
{{- end }}
184185

185186
{{- define "databaseSecret.volumeMount" -}}
186-
{{- with .Values.common.databaseSecret.name -}}
187+
{{- $secretName := tpl (.Values.flyte.common.databaseSecret.name | default "") . -}}
188+
{{- if $secretName }}
187189
- mountPath: /etc/db
188-
name: {{ . }}
190+
name: {{ $secretName }}
189191
{{- end }}
190192
{{- end }}
191193

0 commit comments

Comments
 (0)