helmfile
helmfile copied to clipboard
Support for helm's post-renderer flag
Hello! We are using our own post-renderer with helm. It creates resources from JS files. We are basically writing charts using JavaScript. There are currently no easy way to integrate it with helmfile.
I want to add to helmfile ability to specify post-renderer, so I've written proposal how it may look like. There are no difference with how other helm flags implemented. If everything looks good let me know and I'll start working on a PR.
Such functionality was already discussed in #1351, but since it was more about kustomize, not generic post-renderer, I've decided to create a new issue.
Proposal
Ability to specify post-renderers for release
releases:
- name: vault
namespace: vault
postRenderers:
- ./path/to/post-renderer
Ability to specify post-renderers for all releases
helmDefaults:
postRenderers:
- ./path/to/post-renderer
Ability to reset default post-renderers
releases:
- name: vault
namespace: vault
postRenderers: [] # or null
helmDefaults:
postRenderers:
- ./path/to/post-renderer
Path to post-renderer can be be
- absolute (starts with /) — then it will be passed to helm as-is
- relative (starts with ./) — then it will be prepended with helmfile.yaml dir path and then passed to helm
- Other — then it will be passed to helm as-is, assuming the executable exists in the PATH
Also it might be nessecary to add some extra validation if post-renderer executable exists.
--post-renderer flag (or flags) will be passed to commands:
helm diffhelm templatehelm upgrade
If installed helm version does not support post-renderer, the error will be displayed. The same with helm-diff (when helmfile diff/apply used)
Hi, I think that you can use args to work around it. I have another use case for it - automatic upgrade of resources before applying by kubectl convert. Thanks
@AssafKatz3 Thanks for sharing! --args isn't well-designed so i wont recommend using it as written at https://github.com/roboll/helmfile/issues/1804#issuecomment-1039975686, but if it works... go ahead.
BTW, I'd welcome any contributions towards adding a post-renderer support to helmfile.
Seems like #510 fixed this.