-
I am using yq to update helm chart yaml files.
to:
I could do that easily in version 3, however I have not yet found how to do it in version 4. Ideally this may work:
However this sets the ingress hosts variable to a text string, instead of setting it to a list of dicts. If I remove the outer " " , I get error that the [ is unexpected. Any ideas? Help kindly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
What you need to do is append to the array. Putting everything in double quotes will set it as a string. I'm not at a machine with
Note that quotes are required around the string key name (as you can use an expression for the key, just as you do for the value). |
Beta Was this translation helpful? Give feedback.
What you need to do is append to the array. Putting everything in double quotes will set it as a string.
I'm not at a machine with
yq
installed, but it should look something like:Note that quotes are required around the string key name (as you can use an expression for the key, just as you do for the value).