shareinto commented on code in PR #1386:
URL:
https://github.com/apache/apisix-ingress-controller/pull/1386#discussion_r1037927349
##########
pkg/providers/apisix/provider_init.go:
##########
@@ -48,23 +48,26 @@ func (p *apisixProvider) Init(ctx context.Context) error {
pluginConfigMapA6 = make(map[string]string)
)
+ p.apisixSharedInformerFactory.Start(ctx.Done())
+ p.apisixSharedInformerFactory.WaitForCacheSync(ctx.Done())
+
namespaces := p.namespaceProvider.WatchingNamespaces()
+
for _, key := range namespaces {
log.Debugf("start to watch namespace: %s", key)
wg.Add(1)
go func(ns string) {
defer wg.Done()
// ApisixRoute
- opts := v1.ListOptions{}
switch p.common.Config.Kubernetes.APIVersion {
case config.ApisixV2beta3:
- retRoutes, err :=
p.common.KubeClient.APISIXClient.ApisixV2beta3().ApisixRoutes(ns).List(ctx,
opts)
+ retRoutes, err :=
p.apisixSharedInformerFactory.Apisix().V2beta3().ApisixRoutes().Lister().ApisixRoutes(ns).List(labels.Nothing())
Review Comment:
Thanks for reminding, I'll fix it as soon as possible
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]