Skip to content

Commit 51a0c51

Browse files
author
Jeff Peeler
authored
Merge pull request #550 from jpeeler/fix-deployment-lister
fix(olm): set lister up for deployments
2 parents 9af7657 + 69caa7c commit 51a0c51

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/controller/operators/olm/operator.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,10 @@ func NewOperator(crClient versioned.Interface, opClient operatorclient.ClientInt
191191
depInformers := []cache.SharedIndexInformer{}
192192
for _, namespace := range namespaces {
193193
log.Debugf("watching deployments in namespace %s", namespace)
194-
informer := informers.NewSharedInformerFactoryWithOptions(opClient.KubernetesInterface(), wakeupInterval, informers.WithNamespace(namespace)).Apps().V1().Deployments().Informer()
195-
depInformers = append(depInformers, informer)
194+
informerFactory := informers.NewSharedInformerFactoryWithOptions(opClient.KubernetesInterface(), wakeupInterval, informers.WithNamespace(namespace))
195+
informer := informerFactory.Apps().V1().Deployments()
196+
depInformers = append(depInformers, informer.Informer())
197+
op.lister.AppsV1().RegisterDeploymentLister(namespace, informer.Lister())
196198
}
197199

198200
depQueue := workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "csv-deployments")

0 commit comments

Comments
 (0)