_exec.tpl 737 B

123456789101112131415161718
  1. {{/* Returns exec action */}}
  2. {{/* Call this template:
  3. {{ include "ix.v1.common.lib.container.actions.exec" (dict "rootCtx" $ "objectData" $objectData "caller" $caller) }}
  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.actions.exec" -}}
  8. {{- $rootCtx := .rootCtx -}}
  9. {{- $objectData := .objectData -}}
  10. {{- $caller := .caller -}}
  11. {{- if not $objectData.command -}}
  12. {{- fail (printf "Container - Expected non-empty <%s> <command> on [exec] type" $caller) -}}
  13. {{- end }}
  14. exec:
  15. command:
  16. {{- include "ix.v1.common.lib.container.command" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 4}}
  17. {{- end -}}