Re: Remove deprecated args and cmd for v1.0.0 (#598)
This is a successor to #442 rebuilt on top of #594 so that we can merge this while we are still at Hemlfile v0.x without worrying any backward-incompatibility. Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com> Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
This commit is contained in:
parent
7860bddedc
commit
c83ba69f3e
|
|
@ -5,6 +5,7 @@ import (
|
|||
|
||||
"github.com/helmfile/helmfile/pkg/app"
|
||||
"github.com/helmfile/helmfile/pkg/config"
|
||||
"github.com/helmfile/helmfile/pkg/runtime"
|
||||
)
|
||||
|
||||
// NewApplyCmd returns apply subcmd
|
||||
|
|
@ -40,9 +41,11 @@ func NewApplyCmd(globalCfg *config.GlobalImpl) *cobra.Command {
|
|||
f.StringVar(&applyOptions.Output, "output", "", "output format for diff plugin")
|
||||
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(&globalCfg.GlobalOptions.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")
|
||||
if !runtime.V1Mode {
|
||||
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")
|
||||
|
|
|
|||
|
|
@ -86,8 +86,6 @@ func NewRootCmd(globalConfig *config.GlobalOptions) (*cobra.Command, error) {
|
|||
NewApplyCmd(globalImpl),
|
||||
NewBuildCmd(globalImpl),
|
||||
NewCacheCmd(globalImpl),
|
||||
NewChartsCmd(globalImpl),
|
||||
NewDeleteCmd(globalImpl),
|
||||
NewDepsCmd(globalImpl),
|
||||
NewDestroyCmd(globalImpl),
|
||||
NewFetchCmd(globalImpl),
|
||||
|
|
@ -105,6 +103,13 @@ func NewRootCmd(globalConfig *config.GlobalOptions) (*cobra.Command, error) {
|
|||
),
|
||||
)
|
||||
|
||||
if !runtime.V1Mode {
|
||||
cmd.AddCommand(
|
||||
NewChartsCmd(globalImpl),
|
||||
NewDeleteCmd(globalImpl),
|
||||
)
|
||||
}
|
||||
|
||||
return cmd, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue