Skip to content

Commit

Permalink
Remove operatorgroup queueinformer (#2753)
Browse files Browse the repository at this point in the history
Removes the unneccesary operatorgroup queueinformer, since only an
operatorgroup lister is needed. Also ensures that the syncResolvingNamespace function is no longer triggered by operatorgroup events.

Signed-off-by: Daniel Sover <dsover@redhat.com>
  • Loading branch information
exdx committed Apr 29, 2022
1 parent dbd5b6f commit dc7b00b
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions pkg/controller/operators/catalog/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,19 +259,7 @@ func NewOperator(ctx context.Context, kubeconfigPath string, clock utilclock.Clo

operatorGroupInformer := crInformerFactory.Operators().V1().OperatorGroups()
op.lister.OperatorsV1().RegisterOperatorGroupLister(metav1.NamespaceAll, operatorGroupInformer.Lister())
ogQueue := workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "ogs")
op.ogQueueSet.Set(metav1.NamespaceAll, ogQueue)
operatorGroupQueueInformer, err := queueinformer.NewQueueInformer(
ctx,
queueinformer.WithLogger(op.logger),
queueinformer.WithQueue(ogQueue),
queueinformer.WithInformer(operatorGroupInformer.Informer()),
queueinformer.WithSyncer(queueinformer.LegacySyncHandler(op.syncResolvingNamespace).ToSyncer()),
)
if err != nil {
return nil, err
}
if err := op.RegisterQueueInformer(operatorGroupQueueInformer); err != nil {
if err := op.RegisterInformer(operatorGroupInformer.Informer()); err != nil {
return nil, err
}

Expand Down

0 comments on commit dc7b00b

Please sign in to comment.