From 80323d6edb2a9457de6fcf2c307b4c857ebd2f33 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 2cb95517e633..4e091341fcec 100644 --- a/pkg/dependenciesdistributor/dependencies_distributor.go +++ b/pkg/dependenciesdistributor/dependencies_distributor.go @@ -656,11 +656,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 }, }).