diff --git a/library/common/1.0.0/templates/lib/container/env/_env.tpl b/library/common/1.0.0/templates/lib/container/env/_env.tpl index 444895222c..641252cc21 100644 --- a/library/common/1.0.0/templates/lib/container/env/_env.tpl +++ b/library/common/1.0.0/templates/lib/container/env/_env.tpl @@ -6,8 +6,12 @@ {{- $root := .root -}} {{- $containerName := .containerName -}} + {{/* We need to make sure that is always dict. With nested values. + Will be removed once the tpl is moved in upper level + */}} + {{- $envDict := (dict "envs" $envs) -}} {{- if $envs -}} - {{- $envs = fromYaml (tpl ($envs | toYaml) $root) -}} + {{- $envs = (fromYaml (tpl ($envDict | toYaml) $root)).envs -}} {{- end -}} {{- $dupeCheck := dict -}} diff --git a/library/common/1.0.0/templates/lib/container/env/_envList.tpl b/library/common/1.0.0/templates/lib/container/env/_envList.tpl index 0bf22a4b0e..a9af437b81 100644 --- a/library/common/1.0.0/templates/lib/container/env/_envList.tpl +++ b/library/common/1.0.0/templates/lib/container/env/_envList.tpl @@ -6,9 +6,8 @@ {{- $containerName := .containerName -}} {{- $root := .root -}} - {{/* Slices cannot be converted toYaml safely, - temporary convert it to dict. Will be removed - once the tpl is moved in upper level + {{/* We need to make sure that is always dict. With nested values. + Will be removed once the tpl is moved in upper level */}} {{- $envDict := (dict "envs" $envList) -}} {{- if $envList -}}