helm: avoid duplicate env var keys in workload env lists (#8488)
* helm: dedupe merged extraEnvironmentVars in workloads * address comments Co-Authored-By: Copilot <223556219+Copilot@users.noreply.github.com> * range Co-Authored-By: Copilot <223556219+Copilot@users.noreply.github.com> * helm: reuse merge helper for extraEnvironmentVars --------- Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -59,6 +59,18 @@ Inject extra environment vars in the format key:value, if populated
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "seaweedfs.mergeExtraEnvironmentVars" -}}
|
||||
{{- $global := ((.global | default dict).extraEnvironmentVars | default dict) -}}
|
||||
{{- $component := ((.component | default dict).extraEnvironmentVars | default dict) -}}
|
||||
{{- $target := .target -}}
|
||||
{{- range $key, $value := $global }}
|
||||
{{- $_ := set $target $key $value }}
|
||||
{{- end }}
|
||||
{{- range $key, $value := $component }}
|
||||
{{- $_ := set $target $key $value }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Return the proper filer image */}}
|
||||
{{- define "filer.image" -}}
|
||||
{{- if .Values.filer.imageOverride -}}
|
||||
|
||||
Reference in New Issue
Block a user