Revert addons.go
parent
f4ace95f5b
commit
9baaeea36a
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue