fix SetRetainValuesFiles issue
Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
		
							parent
							
								
									2a7669f8fa
								
							
						
					
					
						commit
						06cfdfc891
					
				|  | @ -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.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.StringVar(&applyOptions.Args, "args", "", "pass args to helm exec") | ||||||
| 	f.BoolVar(&applyOptions.RetainValuesFiles, "retain-values-files", false, "DEPRECATED: Use skip-cleanup instead") | 	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.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.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`) | 	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`) | ||||||
|  |  | ||||||
|  | @ -899,7 +899,7 @@ var ( | ||||||
| 
 | 
 | ||||||
| 	SetRetainValuesFiles = func(r bool) func(o *LoadOpts) { | 	SetRetainValuesFiles = func(r bool) func(o *LoadOpts) { | ||||||
| 		return func(o *LoadOpts) { | 		return func(o *LoadOpts) { | ||||||
| 			o.RetainValuesFiles = true | 			o.RetainValuesFiles = r | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue