Merge pull request #4338 from ctripcloud/fix-incorrect-fortype
fix incorrect forType in clusterResourceBinding status controller
This commit is contained in:
commit
5b391e7535
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue