From 42985d4fea586de3ca9535755d5e2c767d58e350 Mon Sep 17 00:00:00 2001 From: changzhen Date: Thu, 12 Dec 2024 15:48:34 +0800 Subject: [PATCH] Fix the problem of ResourceBinding remaining when the workload is deleted in the dependencies distribution scenario Signed-off-by: changzhen --- pkg/dependenciesdistributor/dependencies_distributor.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkg/dependenciesdistributor/dependencies_distributor.go b/pkg/dependenciesdistributor/dependencies_distributor.go index 7dad0ba3c149..bb3e1b17fe22 100644 --- a/pkg/dependenciesdistributor/dependencies_distributor.go +++ b/pkg/dependenciesdistributor/dependencies_distributor.go @@ -640,11 +640,6 @@ func (d *DependenciesDistributor) SetupWithManager(mgr controllerruntime.Manager return false } - // prevent newBindingObject from the queue if it's not scheduled yet. - if len(oldBindingObject.Spec.Clusters) == 0 && len(newBindingObject.Spec.Clusters) == 0 { - klog.V(4).Infof("Dropping resource binding(%s/%s) as it is not scheduled yet.", newBindingObject.Namespace, newBindingObject.Name) - return false - } return oldBindingObject.Spec.PropagateDeps || newBindingObject.Spec.PropagateDeps }, }).