Add --post-render support also for diff

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
Yusuke Kuoka
2022-12-13 13:12:07 +08:00
committed by yxxhero
parent 608bb0b525
commit c2e7804479
2 changed files with 13 additions and 0 deletions
+5
View File
@@ -446,6 +446,11 @@ func (helm *execer) DiffRelease(context HelmContext, name, chart string, suppres
enableLiveOutput := false
overrideEnableLiveOutput = &enableLiveOutput
}
if helm.IsHelm3() && helm.postRenderer != "" {
flags = append(flags, "--post-renderer", helm.postRenderer)
}
out, err := helm.exec(append(append(preArgs, "diff", "upgrade", "--allow-unreleased", name, chart), flags...), env, overrideEnableLiveOutput)
// Do our best to write STDOUT only when diff existed
// Unfortunately, this works only when you run helmfile with `--detailed-exitcode`