File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
pkg/node-cleanup/controller Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -260,6 +260,10 @@ func (c *CleanupController) startCleanupTimersIfNeeded() {
260260 }
261261
262262 for _ , pv := range pvs {
263+ if ! common .IsLocalPVWithStorageClass (pv , c .storageClassNames ) {
264+ continue
265+ }
266+
263267 nodeName , ok := common .NodeAttachedToLocalPV (pv )
264268 if ! ok {
265269 klog .Errorf ("error getting node attached to pv: %s" , pv )
@@ -285,7 +289,7 @@ func (c *CleanupController) startCleanupTimersIfNeeded() {
285289// The PV must be a local PV, have a StorageClass present in the list of storageClassNames, have a NodeAffinity
286290// to a deleted Node, and have a PVC bound to it (otherwise there's nothing to clean up).
287291func (c * CleanupController ) shouldEnqueueEntry (pv * v1.PersistentVolume , nodeName string ) (bool , error ) {
288- if ! common . IsLocalPVWithStorageClass ( pv , c . storageClassNames ) || pv .Spec .ClaimRef == nil {
292+ if pv .Spec .ClaimRef == nil {
289293 return false , nil
290294 }
291295
You can’t perform that action at this time.
0 commit comments