Skip to content

Commit

Permalink
updated service account informer in apiserversource
Browse files Browse the repository at this point in the history
  • Loading branch information
yijie-04 committed Jan 22, 2024
1 parent e76634a commit 8e112d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/reconciler/apiserversource/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func NewController(
deploymentInformer := deploymentinformer.Get(ctx)
apiServerSourceInformer := apiserversourceinformer.Get(ctx)
namespaceInformer := namespace.Get(ctx)
serviceaccountInformer := serviceaccountinformer.Get(ctx, sources.OIDCTokenRoleLabelSelector)
oidcServiceaccountInformer := serviceaccountinformer.Get(ctx, sources.OIDCTokenRoleLabelSelector)

// Create a selector string
roleInformer := roleinformer.Get(ctx, sources.OIDCTokenRoleLabelSelector)
Expand All @@ -90,7 +90,7 @@ func NewController(
ceSource: GetCfgHost(ctx),
configs: reconcilersource.WatchConfigurations(ctx, component, cmw),
namespaceLister: namespaceInformer.Lister(),
serviceAccountLister: serviceaccountInformer.Lister(),
serviceAccountLister: oidcServiceaccountInformer.Lister(),
roleLister: roleInformer.Lister(),
roleBindingLister: rolebindingInformer.Lister(),
trustBundleConfigMapLister: trustBundleConfigMapInformer.Lister(),
Expand Down Expand Up @@ -143,7 +143,7 @@ func NewController(
})

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

0 comments on commit 8e112d8

Please sign in to comment.