mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-03 10:38:26 +02:00
When helmfile template is run with both --output-dir (from --output-dir-template) and --post-renderer, Helm writes template files to the output directory before invoking the post-renderer, bypassing it entirely. Fix this by stripping --output-dir from the flags passed to Helm when a post-renderer is also specified. Helm then sends all rendered manifests through the post-renderer to stdout. writeRenderedManifests() captures that output and writes it to the output directory, splitting documents by their '# Source:' comments to recreate the per-template file structure. Documents without a '# Source:' comment (e.g. resources injected by the post-renderer) are collected into a single fallback 'manifest.yaml' file. Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/38cec14e-e49f-4e90-918e-d400de52bd8e Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>