templating: container command and args using string
not []string
#13124
-
|
Beta Was this translation helpful? Give feedback.
Answered by
agilgur5
May 31, 2024
Replies: 1 comment 2 replies
-
The error is correct. You gave it a string input, but
Argo can't do that transformation for you; ultimately a template is still a YAML string and Argo would not know what you want to convert. You could instead do, for instance: command:
- '{{inputs.parameters.k8s_cmd_part1}}'
- '{{inputs.parameters.k8s_cmd_part2}}' |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
agilgur5
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The error is correct. You gave it a string input, but
command
accepts a string array.command: '['/bin/bash','-c']'
is invalid, note the quotes around the array.You would want
command: ['/bin/bash','-c']
.Argo can't do that transformation for you; ultimately a template is still a YAML string and Argo would not know what you want to convert.
You could instead do, for instance: