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
+9 -1
View File
@@ -92,6 +92,11 @@ func (helm *Helm) SetHelmBinary(bin string) {
}
func (helm *Helm) SetEnableLiveOutput(enableLiveOutput bool) {
}
func (helm *Helm) SetPostRenderer(postRenderer string) {
}
func (helm *Helm) GetPostRenderer() string {
return ""
}
func (helm *Helm) AddRepo(name, repository, cafile, certfile, keyfile, username, password string, managed string, passCredentials string, skipTLSVerify string) error {
helm.Repo = []string{name, repository, cafile, certfile, keyfile, username, password, managed, passCredentials, skipTLSVerify}
return nil
@@ -200,7 +205,10 @@ func (helm *Helm) ChartExport(chart string, path string, flags ...string) error
return nil
}
func (helm *Helm) IsHelm3() bool {
return helm.Helm3
if helm.Version == nil {
return helm.Helm3
}
return helm.Version.Major() == 3
}
func (helm *Helm) GetVersion() helmexec.Version {