Merge pull request #2759 from wuyingjun-lucky/clean_up

remove overridepolicy trigger on cluster_resource_binding_controller
This commit is contained in:
karmada-bot 2022-11-09 15:16:53 +08:00 committed by GitHub
commit 55b27201f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 3 deletions

View File

@ -218,7 +218,6 @@ func (c *ClusterResourceBindingController) SetupWithManager(mgr controllerruntim
return controllerruntime.NewControllerManagedBy(mgr).For(&workv1alpha2.ClusterResourceBinding{}).
Watches(&source.Kind{Type: &workv1alpha1.Work{}}, handler.EnqueueRequestsFromMapFunc(workFn), workPredicateFn).
Watches(&source.Kind{Type: &policyv1alpha1.OverridePolicy{}}, handler.EnqueueRequestsFromMapFunc(c.newOverridePolicyFunc())).
Watches(&source.Kind{Type: &policyv1alpha1.ClusterOverridePolicy{}}, handler.EnqueueRequestsFromMapFunc(c.newOverridePolicyFunc())).
WithOptions(controller.Options{
RateLimiter: ratelimiterflag.DefaultControllerRateLimiter(c.RateLimiterOptions),
@ -232,8 +231,6 @@ func (c *ClusterResourceBindingController) newOverridePolicyFunc() handler.MapFu
switch t := a.(type) {
case *policyv1alpha1.ClusterOverridePolicy:
overrideRS = t.Spec.ResourceSelectors
case *policyv1alpha1.OverridePolicy:
overrideRS = t.Spec.ResourceSelectors
default:
return nil
}