Skip to content

Commit

Permalink
update filter when using EnqueueControllerOf in route controller (#1862)
Browse files Browse the repository at this point in the history
  • Loading branch information
nader-ziada authored and knative-prow-robot committed Aug 15, 2018
1 parent 218bd97 commit b1d14bd
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions pkg/reconciler/v1alpha1/route/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,20 @@ func NewController(
UpdateFunc: controller.PassNew(c.EnqueueReferringRoute(impl)),
})

serviceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: impl.EnqueueControllerOf,
UpdateFunc: controller.PassNew(impl.EnqueueControllerOf),
serviceInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: controller.Filter(v1alpha1.SchemeGroupVersion.WithKind("Route")),
Handler: cache.ResourceEventHandlerFuncs{
AddFunc: impl.EnqueueControllerOf,
UpdateFunc: controller.PassNew(impl.EnqueueControllerOf),
},
})

virtualServiceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: impl.EnqueueControllerOf,
UpdateFunc: controller.PassNew(impl.EnqueueControllerOf),
virtualServiceInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: controller.Filter(v1alpha1.SchemeGroupVersion.WithKind("Route")),
Handler: cache.ResourceEventHandlerFuncs{
AddFunc: impl.EnqueueControllerOf,
UpdateFunc: controller.PassNew(impl.EnqueueControllerOf),
},
})

c.Logger.Info("Setting up ConfigMap receivers")
Expand Down

0 comments on commit b1d14bd

Please sign in to comment.