From dc7b00b05d9575f17c969c97f5b47475348068fd Mon Sep 17 00:00:00 2001 From: exdx Date: Fri, 29 Apr 2022 16:02:26 -0400 Subject: [PATCH] Remove operatorgroup queueinformer (#2753) 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 --- pkg/controller/operators/catalog/operator.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/pkg/controller/operators/catalog/operator.go b/pkg/controller/operators/catalog/operator.go index 93b298cc2c..7a711c512d 100644 --- a/pkg/controller/operators/catalog/operator.go +++ b/pkg/controller/operators/catalog/operator.go @@ -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 }