diff --git a/pkg/addons/addons.go b/pkg/addons/addons.go index ca9aa52254..94016ab2e2 100644 --- a/pkg/addons/addons.go +++ b/pkg/addons/addons.go @@ -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 }