make sure key exists

This commit is contained in:
Stavros Kois
2023-02-24 02:29:18 +02:00
committed by GitHub
parent aeb8deb43b
commit e5facbba77

View File

@@ -31,7 +31,10 @@
{{- $container := include "tc.v1.common.lib.deps.wait.clickhouse" $ | fromYaml -}}
{{- if $container -}}
{{- range .Values.workload -}}
{{- $_ := set .podSpec.initContainers "clickhouse-wait" $container -}}
{{- if not (hasKey "initContainers" .) -}}
{{- $_ := set .podSpec "initContainers" dict -}}
{{- end -}}
{{- $_ := set .podSpec.initContainers "clickhouse-wait" $container -}}
{{- end }}
{{- end -}}
{{- end }}