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

@@ -0,0 +1,14 @@
package commandutil
import (
"os"
)
// EnabkeAlphaCommmandsEnvName is the environment variable used to enable Alpha kustomize commands.
//If set to "true" alpha commands will be enabled.
const EnableAlphaCommmandsEnvName = "KUSTOMIZE_ENABLE_ALPHA_COMMANDS"
// GetAlphaEnabled returns true if alpha commands should be enabled.
func GetAlphaEnabled() bool {
return os.Getenv(EnableAlphaCommmandsEnvName) == "true"
}