Skip to content
Discussion options

You must be logged in to vote

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:

yq -i   ' .ingress.hosts += {"host": chart.domain.com, "paths": []}'

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).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@juanpons
Comment options

Answer selected by juanpons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants