fix(#507): support assign --post-renderer within helmfile flags and helmdefault or release config

1. only implement post-renderer flags this patch
2. As mumoshu advise, add helmfile flags `--post-render` and add the
   postRenderer  config in helmDefaults and release. the priority is
   helmfile flags > release > helmDefaults.
3. fix the test case in state_test.go and some other tests.

Signed-off-by: guofutan <guofutan@tencent.com>
Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
guofutan
2022-12-13 13:12:07 +08:00
committed by yxxhero
parent 1f0f7ec8d6
commit 0a953731b0
18 changed files with 320 additions and 102 deletions
+1
View File
@@ -44,6 +44,7 @@ func NewSyncCmd(globalCfg *config.GlobalImpl) *cobra.Command {
f.BoolVar(&syncOptions.Wait, "wait", false, `Override helmDefaults.wait setting "helm upgrade --install --wait"`)
f.BoolVar(&syncOptions.WaitForJobs, "wait-for-jobs", false, `Override helmDefaults.waitForJobs setting "helm upgrade --install --wait-for-jobs"`)
f.BoolVar(&syncOptions.ReuseValues, "reuse-values", false, `Override helmDefaults.reuseValues "helm upgrade --install --reuse-values"`)
f.StringVar(&syncOptions.PostRenderer, "post-renderer", "", `pass post-renderer to "helm template" or "helm upgrade --install"`)
return cmd
}