Skip to content

Commit 5b391e7

Browse files
authored
Merge pull request #4338 from ctripcloud/fix-incorrect-fortype
fix incorrect forType in clusterResourceBinding status controller
2 parents 2039486 + f8569d3 commit 5b391e7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pkg/controllers/status/common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import (
3737
"github.com/karmada-io/karmada/pkg/util/restmapper"
3838
)
3939

40-
var rbPredicateFn = builder.WithPredicates(predicate.Funcs{
40+
var bindingPredicateFn = builder.WithPredicates(predicate.Funcs{
4141
CreateFunc: func(e event.CreateEvent) bool { return false },
4242
UpdateFunc: func(e event.UpdateEvent) bool {
4343
var oldResourceVersion, newResourceVersion string

pkg/controllers/status/crb_status_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func (c *CRBStatusController) SetupWithManager(mgr controllerruntime.Manager) er
102102
})
103103

104104
return controllerruntime.NewControllerManagedBy(mgr).Named("clusterResourceBinding_status_controller").
105-
For(&workv1alpha2.ResourceBinding{}, rbPredicateFn).
105+
For(&workv1alpha2.ClusterResourceBinding{}, bindingPredicateFn).
106106
Watches(&workv1alpha1.Work{}, handler.EnqueueRequestsFromMapFunc(workMapFunc), workPredicateFn).
107107
WithOptions(controller.Options{RateLimiter: ratelimiterflag.DefaultControllerRateLimiter(c.RateLimiterOptions)}).
108108
Complete(c)

pkg/controllers/status/rb_status_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func (c *RBStatusController) SetupWithManager(mgr controllerruntime.Manager) err
104104
})
105105

106106
return controllerruntime.NewControllerManagedBy(mgr).Named("resourceBinding_status_controller").
107-
For(&workv1alpha2.ResourceBinding{}, rbPredicateFn).
107+
For(&workv1alpha2.ResourceBinding{}, bindingPredicateFn).
108108
Watches(&workv1alpha1.Work{}, handler.EnqueueRequestsFromMapFunc(workMapFunc), workPredicateFn).
109109
WithOptions(controller.Options{RateLimiter: ratelimiterflag.DefaultControllerRateLimiter(c.RateLimiterOptions)}).
110110
Complete(c)

0 commit comments

Comments
 (0)