fix 116028

This commit is contained in:
weizhichen 2023-02-27 12:49:44 +00:00
parent 015e2fa20c
commit d06c0995cb

View File

@ -937,7 +937,7 @@ func (ctrl *PersistentVolumeController) updateVolumePhaseWithEvent(volume *v1.Pe
// Ignores claims that already have a storage class.
// TODO: if resync is ever changed to a larger period, we might need to change how we set the default class on existing unbound claims
func (ctrl *PersistentVolumeController) assignDefaultStorageClass(claim *v1.PersistentVolumeClaim) (bool, error) {
if claim.Spec.StorageClassName != nil {
if storagehelpers.GetPersistentVolumeClaimClass(claim) != "" {
return false, nil
}