Fix setting default StorageClass
parent
e5f070edfc
commit
fc9d510096
|
@ -64,6 +64,10 @@ func enableOrDisableStorageClasses(cc *config.ClusterConfig, name string, val st
|
||||||
}
|
}
|
||||||
|
|
||||||
if enable {
|
if enable {
|
||||||
|
// Enable addon before marking it as default
|
||||||
|
if err = EnableOrDisableAddon(cc, name, val); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
// Only StorageClass for 'name' should be marked as default
|
// Only StorageClass for 'name' should be marked as default
|
||||||
err = storageclass.SetDefaultStorageClass(storagev1, class)
|
err = storageclass.SetDefaultStorageClass(storagev1, class)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -75,7 +79,10 @@ func enableOrDisableStorageClasses(cc *config.ClusterConfig, name string, val st
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrapf(err, "Error disabling %s as the default storage class", class)
|
return errors.Wrapf(err, "Error disabling %s as the default storage class", class)
|
||||||
}
|
}
|
||||||
|
if err = EnableOrDisableAddon(cc, name, val); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return EnableOrDisableAddon(cc, name, val)
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue