Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add serviceaccount in parallel #7373

Merged
15 changes: 7 additions & 8 deletions pkg/reconciler/parallel/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,7 @@ func NewController(
subscriptionInformer := subscription.Get(ctx)
serviceaccountInformer := serviceaccountinformer.Get(ctx)

var globalResync func(obj interface{})
featureStore := feature.NewStore(logging.FromContext(ctx).Named("feature-config-store"), func(name string, value interface{}) {
if globalResync != nil {
globalResync(nil)
}
})
creydr marked this conversation as resolved.
Show resolved Hide resolved
featureStore := feature.NewStore(logging.FromContext(ctx).Named("feature-config-store"))
featureStore.WatchConfigs(cmw)

r := &Reconciler{
Expand All @@ -64,7 +59,11 @@ func NewController(
dynamicClientSet: dynamicclient.Get(ctx),
eventingClientSet: eventingclient.Get(ctx),
}
impl := parallelreconciler.NewImpl(ctx, r)
impl := parallelreconciler.NewImpl(ctx, r, func(impl *controller.Impl) controller.Options {
return controller.Options{
ConfigStore: featureStore,
}
})

r.channelableTracker = duck.NewListableTrackerFromTracker(ctx, channelable.Get, impl.Tracker)
parallelInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue))
Expand All @@ -75,7 +74,7 @@ func NewController(
FilterFunc: controller.FilterController(&v1.Parallel{}),
Handler: controller.HandleAll(impl.EnqueueControllerOf),
})
// Reconciler Trigger when the OIDC service account changes
// Reconciler Parallel when the OIDC service account changes
prakrit55 marked this conversation as resolved.
Show resolved Hide resolved
serviceaccountInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: controller.FilterController(&v1.Parallel{}),
Handler: controller.HandleAll(impl.EnqueueControllerOf),
Expand Down