_args.tpl 711 B

12345678910111213141516171819202122
  1. {{/* Returns args list */}}
  2. {{/* Call this template:
  3. {{ include "ix.v1.common.lib.container.args" (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.args" -}}
  8. {{- $rootCtx := .rootCtx -}}
  9. {{- $objectData := .objectData -}}
  10. {{- range $key := (list "args" "extraArgs") -}}
  11. {{- with (get $objectData $key) -}}
  12. {{- if kindIs "string" . }}
  13. - {{ tpl . $rootCtx | quote }}
  14. {{- else if kindIs "slice" . -}}
  15. {{- range $arg := . }}
  16. - {{ tpl $arg $rootCtx | quote }}
  17. {{- end -}}
  18. {{- end -}}
  19. {{- end -}}
  20. {{- end -}}
  21. {{- end -}}