From d06c0995cbec9915bcbb51f4026274225bb58ff3 Mon Sep 17 00:00:00 2001 From: weizhichen Date: Mon, 27 Feb 2023 12:49:44 +0000 Subject: [PATCH] fix 116028 --- pkg/controller/volume/persistentvolume/pv_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/volume/persistentvolume/pv_controller.go b/pkg/controller/volume/persistentvolume/pv_controller.go index 0e747afc5da..c3514af2de7 100644 --- a/pkg/controller/volume/persistentvolume/pv_controller.go +++ b/pkg/controller/volume/persistentvolume/pv_controller.go @@ -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 }