Skip to content

Commit

Permalink
Merge pull request #4338 from ctripcloud/fix-incorrect-fortype
Browse files Browse the repository at this point in the history
fix incorrect forType in clusterResourceBinding status controller
  • Loading branch information
karmada-bot authored Dec 4, 2023
2 parents 2039486 + f8569d3 commit 5b391e7
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 5b391e7

Please sign in to comment.