Merge pull request #388 from helmfile/fix_retain_values_issue

fix SetRetainValuesFiles issue
This commit is contained in:
yxxhero 2022-10-05 10:10:34 +08:00 committed by GitHub
commit e6b263340d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -41,6 +41,9 @@ func NewApplyCmd(globalCfg *config.GlobalImpl) *cobra.Command {
f.BoolVar(&applyOptions.DetailedExitcode, "detailed-exitcode", false, "return a non-zero exit code 2 instead of 0 when there were changes detected AND the changes are synced successfully")
f.StringVar(&applyOptions.Args, "args", "", "pass args to helm exec")
f.BoolVar(&applyOptions.RetainValuesFiles, "retain-values-files", false, "DEPRECATED: Use skip-cleanup instead")
// mark retain-values-files as deprecated, but keep it for backward compatibility, will be removed in the future
_ = f.MarkDeprecated("retain-values-files", "Use skip-cleanup instead")
f.BoolVar(&applyOptions.SkipCleanup, "skip-cleanup", false, "Stop cleaning up temporary values generated by helmfile and helm-secrets. Useful for debugging. Don't use in production for security")
f.BoolVar(&applyOptions.SkipCRDs, "skip-crds", false, "if set, no CRDs will be installed on sync. By default, CRDs are installed if not already present")
f.BoolVar(&applyOptions.SkipNeeds, "skip-needs", true, `do not automatically include releases from the target release's "needs" when --selector/-l flag is provided. Does nothing when --selector/-l flag is not provided. Defaults to true when --include-needs or --include-transitive-needs is not provided`)

View File

@ -899,7 +899,7 @@ var (
SetRetainValuesFiles = func(r bool) func(o *LoadOpts) {
return func(o *LoadOpts) {
o.RetainValuesFiles = true
o.RetainValuesFiles = r
}
}