Replies: 2 comments 1 reply
-
The more I think about it, the more I think that kustomize would not meet my needs anyways, and that I would be much better off using 'yq' as helm post renderer anyways. Are there any resources/quick recipes available that show how to do the most common 'manifest manipulations' as a single yq command? Or would I need to pipe several yq commands together using shell pipes?
It's late here, can't experiment now (I will tomorrow!) but can't get this out of my head, hence the post... |
Beta Was this translation helpful? Give feedback.
-
My initial progress is as follows:
This seems to work as expected, and I am confident I can extend this to my other use-cases. I'm still wondering though if there is a better/more preferred approach? Also: can I somehow include comments inside the expression, so I can document what each block is doing? |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm working with a massive Helm chart/subcharts, and some of the subcharts generate duplicate keys out of their templates.
Is there a way with yq to merge or remove duplicate keys from this file? E.g. something like:
help template my-release . | yq '' > all.yaml
(to show how "massive" this chart is, all.yaml is currently over 45K lines, and I've only enabled part of it).
The end objective is that I need to run "kustomize build ." on this output, which is currently failing due to the duplicate keys.
About the logic on which value to keep for duplicate keys, it doesn't really matter to me, but slightly prefer to keep the last occurrence in each document.
Beta Was this translation helpful? Give feedback.
All reactions