Revert addons.go

pull/13805/head
klaases 2022-03-17 10:33:55 -07:00
parent f4ace95f5b
commit 9baaeea36a
1 changed files with 3 additions and 4 deletions

View File

@ -149,7 +149,7 @@ func SetBool(cc *config.ClusterConfig, name string, val string) error {
}
// EnableOrDisableAddon updates addon status executing any commands necessary
func EnableOrDisableAddon(cc *config.ClusterConfig, name, val string) error {
func EnableOrDisableAddon(cc *config.ClusterConfig, name string, val string) error {
klog.Infof("Setting addon %s=%s in %q", name, val, cc.Name)
enable, err := strconv.ParseBool(val)
if err != nil {
@ -159,11 +159,10 @@ func EnableOrDisableAddon(cc *config.ClusterConfig, name, val string) error {
// check addon status before enabling/disabling it
if isAddonAlreadySet(cc, addon, enable) {
switch addon.Name() {
case "gcp-auth", "storage-provisioner", "default-storageclass":
if addon.Name() == "gcp-auth" {
return nil
}
out.WarningT("addon {{.name}} is already set to {{.val}}", out.V{"name": name, "val": val})
klog.Warningf("addon %s should already be in state %v", name, val)
if !enable {
return nil
}