_envList.tpl 830 B

12345678910111213141516171819
  1. {{/* Returns Env List */}}
  2. {{/* Call this template:
  3. {{ include "ix.v1.common.lib.container.envList" (dict "rootCtx" $ "objectData" $objectData) }}
  4. rootCtx: The root context of the chart.
  5. objectData: The object data to be used to render the container.
  6. */}}
  7. {{- define "ix.v1.common.lib.container.envList" -}}
  8. {{- $rootCtx := .rootCtx -}}
  9. {{- $objectData := .objectData -}}
  10. {{- range $env := $objectData.envList -}}
  11. {{- if not $env.name -}}
  12. {{- fail "Container - Expected non-empty <envList.name>" -}}
  13. {{- end -}} {{/* Empty value is valid */}}
  14. {{- include "ix.v1.common.helper.container.envDupeCheck" (dict "rootCtx" $rootCtx "objectData" $objectData "source" "envList" "key" $env.name) }}
  15. - name: {{ $env.name | quote }}
  16. value: {{ tpl (toString $env.value) $rootCtx | quote }}
  17. {{- end -}}
  18. {{- end -}}