mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-17 16:31:12 +02:00
Add option to suppress diff on apply (#1092)
* Add option to suppress diff on apply Add --supress-diff option on apply. Usable for fresh installs when a lot of output is produces by diff. Resolves #458 * fix tests for suppress-diff
This commit is contained in:
@@ -255,7 +255,7 @@ func (helm *execer) TemplateRelease(name string, chart string, flags ...string)
|
||||
return err
|
||||
}
|
||||
|
||||
func (helm *execer) DiffRelease(context HelmContext, name, chart string, flags ...string) error {
|
||||
func (helm *execer) DiffRelease(context HelmContext, name, chart string, suppressDiff bool, flags ...string) error {
|
||||
helm.logger.Infof("Comparing release=%v, chart=%v", name, chart)
|
||||
preArgs := context.GetTillerlessArgs(helm)
|
||||
env := context.getTillerlessEnv()
|
||||
@@ -273,11 +273,13 @@ func (helm *execer) DiffRelease(context HelmContext, name, chart string, flags .
|
||||
switch e := err.(type) {
|
||||
case ExitError:
|
||||
if e.ExitStatus() == 2 {
|
||||
helm.write(out)
|
||||
if !(suppressDiff) {
|
||||
helm.write(out)
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if !(suppressDiff) {
|
||||
helm.write(out)
|
||||
}
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user