Fix the problem of ResourceBinding remaining when the workload is deleted in the dependencies distribution scenario

Signed-off-by: changzhen <changzhen5@huawei.com>
This commit is contained in:
changzhen 2024-12-12 15:48:34 +08:00
parent 471d850a19
commit 82fc37ea04
1 changed files with 0 additions and 5 deletions

View File

@ -656,11 +656,6 @@ func (d *DependenciesDistributor) SetupWithManager(mgr controllerruntime.Manager
return false 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 return oldBindingObject.Spec.PropagateDeps || newBindingObject.Spec.PropagateDeps
}, },
}). }).