diff --git a/pkg/controllers/status/common.go b/pkg/controllers/status/common.go index ecd950d25f15..5c4a021aa31b 100644 --- a/pkg/controllers/status/common.go +++ b/pkg/controllers/status/common.go @@ -37,7 +37,7 @@ import ( "github.com/karmada-io/karmada/pkg/util/restmapper" ) -var rbPredicateFn = builder.WithPredicates(predicate.Funcs{ +var bindingPredicateFn = builder.WithPredicates(predicate.Funcs{ CreateFunc: func(e event.CreateEvent) bool { return false }, UpdateFunc: func(e event.UpdateEvent) bool { var oldResourceVersion, newResourceVersion string diff --git a/pkg/controllers/status/crb_status_controller.go b/pkg/controllers/status/crb_status_controller.go index a8241847e791..ae04bee082f3 100644 --- a/pkg/controllers/status/crb_status_controller.go +++ b/pkg/controllers/status/crb_status_controller.go @@ -102,7 +102,7 @@ func (c *CRBStatusController) SetupWithManager(mgr controllerruntime.Manager) er }) return controllerruntime.NewControllerManagedBy(mgr).Named("clusterResourceBinding_status_controller"). - For(&workv1alpha2.ResourceBinding{}, rbPredicateFn). + For(&workv1alpha2.ClusterResourceBinding{}, bindingPredicateFn). Watches(&workv1alpha1.Work{}, handler.EnqueueRequestsFromMapFunc(workMapFunc), workPredicateFn). WithOptions(controller.Options{RateLimiter: ratelimiterflag.DefaultControllerRateLimiter(c.RateLimiterOptions)}). Complete(c) diff --git a/pkg/controllers/status/rb_status_controller.go b/pkg/controllers/status/rb_status_controller.go index a7559984a0e1..a0cc7ef0eebf 100644 --- a/pkg/controllers/status/rb_status_controller.go +++ b/pkg/controllers/status/rb_status_controller.go @@ -104,7 +104,7 @@ func (c *RBStatusController) SetupWithManager(mgr controllerruntime.Manager) err }) return controllerruntime.NewControllerManagedBy(mgr).Named("resourceBinding_status_controller"). - For(&workv1alpha2.ResourceBinding{}, rbPredicateFn). + For(&workv1alpha2.ResourceBinding{}, bindingPredicateFn). Watches(&workv1alpha1.Work{}, handler.EnqueueRequestsFromMapFunc(workMapFunc), workPredicateFn). WithOptions(controller.Options{RateLimiter: ratelimiterflag.DefaultControllerRateLimiter(c.RateLimiterOptions)}). Complete(c)