mirror of https://github.com/helm/helm
Fixes #7891; fixes #10961. This PR adds support for optionally post-rendering hooks. I opted to implement this by adding two new CLI flags: `--post-renderer-hooks` and `--post-renderer-hooks-args`. Why? 1. It retains full backwards compatibility: hooks continue to be skipped by the main post-renderer. 2. It gives users the ability to customize their main manifests and hooks in separate ways. One example of where this might be useful is if somebody is using kubectl-kustomize as their post-renderer to add a new resource to their chart. If we reused that post-renderer as-is, we would duplicate the new resource in the hooks manifest which does not seem like a good idea. Two remaining possible issues with this implementation are: 1. It repeatedly re-exec-ing the hooks post-renderer against each hook manifest, which may incur a perf penalty. 2. Some post-renderers may want to apply different transforms for different hooks and may find parsing the comment added to the hook manifests to be challenging. But I think these issues are fine to ignore for now: users can use the Go library or write a custom plugin if they want finer-grained control. Signed-off-by: Michael Lee <michael.lee.0x2a@gmail.com>pull/12775/head
parent
e81f6140dd
commit
95fa569aa3
Loading…
Reference in new issue