Closed maurits-funda closed 1 year ago
Like command, args should be a list. Try this instead.
args:
- |
echo hello
echo world
For a more detailed explanation see https://stackoverflow.com/questions/33887194/how-to-set-multiple-commands-in-one-yaml-file-with-kubernetes
You are right. However _mainContainer.tpl
also accepts a string and then converts it to a list of one: https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/templates/lib/controller/_mainContainer.tpl#L16.
I noticed that I've accidentally added the quote to command
instead of args
. I've now added it to both, since it applies in both cases.
Hi! Apologies for the delay in response... Devin is right that command and args should be a list of strings. I'll take look at the PR/behavior soon and see if I can align it a bit better
Description of the change
Quote the command and args strings to support multiline arguments.
Changed
Quote the
command
andargs
strings in the main container.Benefits
Without the quoting of the
command
andargs
strings, the following gives an error:The error (which is quite vague):
args: >
does work without this change, but that requires you to add semicolons to each line.Possible drawbacks
If someone manually quoted the
command
orargs
string, it will now be double quoted.Checklist
Chart.yaml
has been bumped according to Semantic Versioning.artifacthub.io/changes
changelog annotation has been updated inChart.yaml
. See Artifact Hub documentation for more info.values.yaml
file.