Merge pull request #4387 from whitewindmills/cpp-cleanup

ensure resource template be un-claimed when deleting cluster policy
This commit is contained in:
karmada-bot 2023-12-18 11:51:14 +08:00 committed by GitHub
commit 92e362ae20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -1185,6 +1185,8 @@ func (d *ResourceDetector) HandleClusterPropagationPolicyDeletion(policyName str
klog.Errorf("Failed to clean up label from resource(%s-%s) when cluster propagation policy(%s) removing, error: %v",
binding.Spec.Resource.Kind, binding.Spec.Resource.Name, policyName, err)
errs = append(errs, err)
// Skip cleaning up policy labels from ClusterResourceBinding, give a chance to do that in a retry loop.
continue
}
// Clean up the labels from the reference binding so that the karmada scheduler won't reschedule the binding.
@ -1210,6 +1212,8 @@ func (d *ResourceDetector) HandleClusterPropagationPolicyDeletion(policyName str
klog.Errorf("Failed to clean up label from resource(%s-%s/%s) when cluster propagation policy(%s) removing, error: %v",
binding.Spec.Resource.Kind, binding.Spec.Resource.Namespace, binding.Spec.Resource.Name, policyName, err)
errs = append(errs, err)
// Skip cleaning up policy labels from ResourceBinding, give a chance to do that in a retry loop.
continue
}
// Clean up the labels from the reference binding so that the karmada scheduler won't reschedule the binding.