Skip to content

Commit

Permalink
updated service account informers in other places
Browse files Browse the repository at this point in the history
  • Loading branch information
yijie-04 committed Jan 22, 2024
1 parent 8e112d8 commit c04375a
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions pkg/reconciler/broker/trigger/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func NewController(
subscriptionInformer := subscriptioninformer.Get(ctx)
configmapInformer := configmapinformer.Get(ctx)
secretInformer := secretinformer.Get(ctx)
serviceaccountInformer := serviceaccountinformer.Get(ctx, sources.OIDCTokenRoleLabelSelector)
oidcServiceaccountInformer := serviceaccountinformer.Get(ctx, sources.OIDCTokenRoleLabelSelector)

featureStore := feature.NewStore(logging.FromContext(ctx).Named("feature-config-store"))
featureStore.WatchConfigs(cmw)
Expand All @@ -77,7 +77,7 @@ func NewController(
triggerLister: triggerLister,
configmapLister: configmapInformer.Lister(),
secretLister: secretInformer.Lister(),
serviceAccountLister: serviceaccountInformer.Lister(),
serviceAccountLister: oidcServiceaccountInformer.Lister(),
}
impl := triggerreconciler.NewImpl(ctx, r, func(impl *controller.Impl) controller.Options {
return controller.Options{
Expand Down Expand Up @@ -115,7 +115,7 @@ func NewController(
})

// Reconciler Trigger when the OIDC service account changes
serviceaccountInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
oidcServiceaccountInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: controller.FilterController(&eventing.Trigger{}),
Handler: controller.HandleAll(impl.EnqueueControllerOf),
})
Expand Down
4 changes: 2 additions & 2 deletions pkg/reconciler/containersource/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func NewController(
containersourceInformer := containersourceinformer.Get(ctx)
sinkbindingInformer := sinkbindinginformer.Get(ctx)
deploymentInformer := deploymentinformer.Get(ctx)
serviceaccountInformer := serviceaccountinformer.Get(ctx, sources.OIDCTokenRoleLabelSelector)
oidcServiceaccountInformer := serviceaccountinformer.Get(ctx, sources.OIDCTokenRoleLabelSelector)
trustBundleConfigMapInformer := configmapinformer.Get(ctx, eventingtls.TrustBundleLabelSelector)

var globalResync func(obj interface{})
Expand All @@ -70,7 +70,7 @@ func NewController(
containerSourceLister: containersourceInformer.Lister(),
deploymentLister: deploymentInformer.Lister(),
sinkBindingLister: sinkbindingInformer.Lister(),
serviceAccountLister: serviceaccountInformer.Lister(),
serviceAccountLister: oidcServiceaccountInformer.Lister(),
trustBundleConfigMapLister: trustBundleConfigMapInformer.Lister(),
}
impl := v1containersource.NewImpl(ctx, r, func(impl *controller.Impl) controller.Options {
Expand Down
6 changes: 3 additions & 3 deletions pkg/reconciler/parallel/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func NewController(

parallelInformer := parallel.Get(ctx)
subscriptionInformer := subscription.Get(ctx)
serviceaccountInformer := serviceaccountinformer.Get(ctx, sources.OIDCTokenRoleLabelSelector)
oidcServiceaccountInformer := serviceaccountinformer.Get(ctx, sources.OIDCTokenRoleLabelSelector)

var globalResync func(obj interface{})
featureStore := feature.NewStore(logging.FromContext(ctx).Named("feature-config-store"), func(name string, value interface{}) {
Expand All @@ -61,7 +61,7 @@ func NewController(
r := &Reconciler{
parallelLister: parallelInformer.Lister(),
subscriptionLister: subscriptionInformer.Lister(),
serviceAccountLister: serviceaccountInformer.Lister(),
serviceAccountLister: oidcServiceaccountInformer.Lister(),
kubeclient: kubeclient.Get(ctx),
dynamicClientSet: dynamicclient.Get(ctx),
eventingClientSet: eventingclient.Get(ctx),
Expand All @@ -86,7 +86,7 @@ func NewController(
Handler: controller.HandleAll(impl.EnqueueControllerOf),
})
// Reconcile Parallel when the OIDC service account changes
serviceaccountInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
oidcServiceaccountInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: controller.FilterController(&v1.Parallel{}),
Handler: controller.HandleAll(impl.EnqueueControllerOf),
})
Expand Down
6 changes: 3 additions & 3 deletions pkg/reconciler/pingsource/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ func NewController(

deploymentInformer := deploymentinformer.Get(ctx)
pingSourceInformer := pingsourceinformer.Get(ctx)
serviceaccountInformer := serviceaccountinformer.Get(ctx, sources.OIDCTokenRoleLabelSelector)
oidcServiceaccountInformer := serviceaccountinformer.Get(ctx, sources.OIDCTokenRoleLabelSelector)

r := &Reconciler{
kubeClientSet: kubeclient.Get(ctx),
leConfig: leConfig,
configAcc: reconcilersource.WatchConfigurations(ctx, component, cmw),
serviceAccountLister: serviceaccountInformer.Lister(),
serviceAccountLister: oidcServiceaccountInformer.Lister(),
}

impl := pingsourcereconciler.NewImpl(ctx, r, func(impl *controller.Impl) controller.Options {
Expand Down Expand Up @@ -114,7 +114,7 @@ func NewController(
)),
})

serviceaccountInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
oidcServiceaccountInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: controller.FilterController(&sourcesv1.PingSource{}),
Handler: controller.HandleAll(impl.EnqueueControllerOf),
})
Expand Down
6 changes: 3 additions & 3 deletions pkg/reconciler/sequence/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func NewController(

sequenceInformer := sequence.Get(ctx)
subscriptionInformer := subscription.Get(ctx)
serviceaccountInformer := serviceaccountinformer.Get(ctx, sources.OIDCTokenRoleLabelSelector)
oidcServiceaccountInformer := serviceaccountinformer.Get(ctx, sources.OIDCTokenRoleLabelSelector)

var globalResync func(obj interface{})
featureStore := feature.NewStore(logging.FromContext(ctx).Named("feature-config-store"), func(name string, value interface{}) {
Expand All @@ -63,7 +63,7 @@ func NewController(
subscriptionLister: subscriptionInformer.Lister(),
dynamicClientSet: dynamicclient.Get(ctx),
eventingClientSet: eventingclient.Get(ctx),
serviceAccountLister: serviceaccountInformer.Lister(),
serviceAccountLister: oidcServiceaccountInformer.Lister(),
kubeclient: kubeclient.Get(ctx),
}

Expand All @@ -88,7 +88,7 @@ func NewController(
})

// Reconcile Sequence when the OIDC service account changes
serviceaccountInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
oidcServiceaccountInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: controller.FilterController(&v1.Sequence{}),
Handler: controller.HandleAll(impl.EnqueueControllerOf),
})
Expand Down
6 changes: 3 additions & 3 deletions pkg/reconciler/sinkbinding/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func NewController(
dc := dynamicclient.Get(ctx)
psInformerFactory := podspecable.Get(ctx)
namespaceInformer := namespace.Get(ctx)
serviceaccountInformer := serviceaccountinformer.Get(ctx, sources.OIDCTokenRoleLabelSelector)
oidcServiceaccountInformer := Serviceaccountinformer.Get(ctx, sources.OIDCTokenRoleLabelSelector)

Check failure on line 85 in pkg/reconciler/sinkbinding/controller.go

View workflow job for this annotation

GitHub Actions / analyze / Go vulnerability Detection

undefined: Serviceaccountinformer

Check failure on line 85 in pkg/reconciler/sinkbinding/controller.go

View workflow job for this annotation

GitHub Actions / build / Build

undefined: Serviceaccountinformer

Check failure on line 85 in pkg/reconciler/sinkbinding/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.27.3, ./test/e2e)

undefined: Serviceaccountinformer

Check failure on line 85 in pkg/reconciler/sinkbinding/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.29.0, ./test/e2e)

undefined: Serviceaccountinformer

Check failure on line 85 in pkg/reconciler/sinkbinding/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.27.3, ./test/auth)

undefined: Serviceaccountinformer

Check failure on line 85 in pkg/reconciler/sinkbinding/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.27.3, ./test/rekt/...)

undefined: Serviceaccountinformer

Check failure on line 85 in pkg/reconciler/sinkbinding/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.29.0, ./test/conformance)

undefined: Serviceaccountinformer

Check failure on line 85 in pkg/reconciler/sinkbinding/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.27.3, ./test/conformance)

undefined: Serviceaccountinformer

Check failure on line 85 in pkg/reconciler/sinkbinding/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.29.0, ./test/rekt/...)

undefined: Serviceaccountinformer

Check failure on line 85 in pkg/reconciler/sinkbinding/controller.go

View workflow job for this annotation

GitHub Actions / test / Unit Tests

undefined: Serviceaccountinformer

Check failure on line 85 in pkg/reconciler/sinkbinding/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.27.3, ./test/experimental)

undefined: Serviceaccountinformer

Check failure on line 85 in pkg/reconciler/sinkbinding/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.29.0, ./test/experimental)

undefined: Serviceaccountinformer

Check failure on line 85 in pkg/reconciler/sinkbinding/controller.go

View workflow job for this annotation

GitHub Actions / e2e tests (v1.29.0, ./test/auth)

undefined: Serviceaccountinformer

Check failure on line 85 in pkg/reconciler/sinkbinding/controller.go

View workflow job for this annotation

GitHub Actions / analyze / Analyze CodeQL

undefined: Serviceaccountinformer
secretInformer := secretinformer.Get(ctx)
trustBundleConfigMapInformer := configmapinformer.Get(ctx, eventingtls.TrustBundleLabelSelector)
trustBundleConfigMapLister := configmapinformer.Get(ctx, eventingtls.TrustBundleLabelSelector).Lister()
Expand Down Expand Up @@ -138,7 +138,7 @@ func NewController(
res: sbResolver,
tracker: impl.Tracker,
kubeclient: kubeclient.Get(ctx),
serviceAccountLister: serviceaccountInformer.Lister(),
serviceAccountLister: oidcServiceaccountInformer.Lister(),
secretLister: secretInformer.Lister(),
featureStore: featureStore,
tokenProvider: auth.NewOIDCTokenProvider(ctx),
Expand All @@ -157,7 +157,7 @@ func NewController(
}

// Reconcile SinkBinding when the OIDC service account changes
serviceaccountInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
oidcServiceaccountInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: controller.FilterController(&v1.SinkBinding{}),
Handler: controller.HandleAll(impl.EnqueueControllerOf),
})
Expand Down
6 changes: 3 additions & 3 deletions pkg/reconciler/subscription/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func NewController(

subscriptionInformer := subscription.Get(ctx)
channelInformer := channel.Get(ctx)
serviceaccountInformer := serviceaccountinformer.Get(ctx, sources.OIDCTokenRoleLabelSelector)
oidcServiceaccountInformer := serviceaccountinformer.Get(ctx, sources.OIDCTokenRoleLabelSelector)

var globalResync func(obj interface{})

Expand All @@ -67,7 +67,7 @@ func NewController(
kreferenceResolver: kref.NewKReferenceResolver(customresourcedefinition.Get(ctx).Lister()),
subscriptionLister: subscriptionInformer.Lister(),
channelLister: channelInformer.Lister(),
serviceAccountLister: serviceaccountInformer.Lister(),
serviceAccountLister: oidcServiceaccountInformer.Lister(),
}
impl := subscriptionreconciler.NewImpl(ctx, r, func(impl *controller.Impl) controller.Options {
return controller.Options{
Expand Down Expand Up @@ -99,7 +99,7 @@ func NewController(
))

// Reconciler Subscription when the OIDC service account changes
serviceaccountInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
oidcServiceaccountInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: controller.FilterController(&messagingv1.Subscription{}),
Handler: controller.HandleAll(impl.EnqueueControllerOf),
})
Expand Down

0 comments on commit c04375a

Please sign in to comment.