From cd2c8cb5fd914ed9ea8928f1ab5b24e555373977 Mon Sep 17 00:00:00 2001 From: carlory Date: Fri, 28 Jun 2024 01:25:45 +0800 Subject: [PATCH] Fix pv reclaim failed due to its phase is wrongly updated to the Failed state by kcm --- .../volume/persistentvolume/pv_controller.go | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pkg/controller/volume/persistentvolume/pv_controller.go b/pkg/controller/volume/persistentvolume/pv_controller.go index 02a6d5d76dd..5e756e0b675 100644 --- a/pkg/controller/volume/persistentvolume/pv_controller.go +++ b/pkg/controller/volume/persistentvolume/pv_controller.go @@ -1935,16 +1935,14 @@ func (ctrl *PersistentVolumeController) findDeletablePlugin(volume *v1.Persisten } } - if utilfeature.DefaultFeatureGate.Enabled(features.HonorPVReclaimPolicy) { - if metav1.HasAnnotation(volume.ObjectMeta, storagehelpers.AnnMigratedTo) { - // CSI migration scenario - do not depend on in-tree plugin - return nil, nil - } + if metav1.HasAnnotation(volume.ObjectMeta, storagehelpers.AnnMigratedTo) { + // CSI migration scenario - do not depend on in-tree plugin + return nil, nil + } - if volume.Spec.CSI != nil { - // CSI volume source scenario - external provisioner is requested - return nil, nil - } + if volume.Spec.CSI != nil { + // CSI volume source scenario - external provisioner is requested + return nil, nil } // The plugin that provisioned the volume was not found or the volume