Skip to content

Commit

Permalink
ensure resource template be un-claimed when deleting cluster policy
Browse files Browse the repository at this point in the history
Signed-off-by: whitewindmills <[email protected]>
  • Loading branch information
whitewindmills committed Dec 7, 2023
1 parent 58b1790 commit f84a0e5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/detector/detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -1177,6 +1177,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.
Expand All @@ -1202,6 +1204,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.
Expand Down

0 comments on commit f84a0e5

Please sign in to comment.