Skip to content

Commit

Permalink
fix incorrect forType in clusterResourceBinding status controller
Browse files Browse the repository at this point in the history
Signed-off-by: lxtywypc <lxtywypc@gmail.com>
  • Loading branch information
lxtywypc committed Nov 29, 2023
1 parent f46f681 commit f8569d3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/controllers/status/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/status/crb_status_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/status/rb_status_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f8569d3

Please sign in to comment.