Skip to content

templating: container command and args using string not []string #13124

Closed Locked Answered by agilgur5
shenshanyoumu asked this question in Q&A
Discussion options

You must be logged in to vote

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:

command:
  - '{{inputs.parameters.k8s_cmd_part1}}'
  - '{{inputs.parameters.k8s_cmd_part2}}'

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@shenshanyoumu
Comment options

@agilgur5
Comment options

Answer selected by agilgur5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area/templating Templating with `{{...}}` type/support User support issue - likely not a bug solution/invalid This is incorrect. Also can be used for spam
2 participants