Merge pull request #556 from garfcat/master

cleanup waitlist after resource template is removed
This commit is contained in:
karmada-bot 2021-07-26 12:10:51 +08:00 committed by GitHub
commit 942db31da4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -177,7 +177,9 @@ func (d *ResourceDetector) Reconcile(key util.QueueKey) error {
object, err := d.GetUnstructuredObject(clusterWideKey)
if err != nil {
if apierrors.IsNotFound(err) {
// The resource may no longer exist, in which case we stop processing.
// The resource may no longer exist, in which case we try (may not exist in waiting list) remove it from waiting list and stop processing.
d.RemoveWaiting(clusterWideKey)
// Once resource be deleted, the derived ResourceBinding or ClusterResourceBinding also need to be cleaned up,
// currently we do that by setting owner reference to derived objects.
return nil