Disable alpha kustomize commands by default.

- enable alpha commands with env KUSTOMIZE_SHOW_ALPHA_COMMANDS=true
This commit is contained in:
Phillip Wittrock
2019-12-11 12:23:35 -08:00
parent fe6dffff2e
commit 6484259632
6 changed files with 40 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ import (
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts"
"sigs.k8s.io/kustomize/cmd/config/cmds"
"sigs.k8s.io/kustomize/kyaml/commandutil"
)
// NewCmdConfig returns an instance of 'config' subcommand.
@@ -50,7 +51,9 @@ func newCmdSave(fSys filesys.FileSystem) *cobra.Command {
}
return o.RunSave(fSys)
},
Hidden: true, // Don't display this command, but keep it for backwards compatibility.
// Alpha version of config is very different than the current version.
// If alpha is enabled, don't display this command, but keep it for backwards compatibility.
Hidden: commandutil.GetAlphaEnabled(),
Deprecated: `The save command is deprecated and will be removed in a future release.
If you require this command file an issue at https://github.com/kubernetes-sigs/kustomize/issues