slene commented on a change in pull request #453:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/453#discussion_r633090335



##########
File path: pkg/kube/init.go
##########
@@ -25,16 +25,12 @@ import (
 
 // KubeClient contains some objects used to communicate with Kubernetes API 
Server.
 type KubeClient struct {
+       cfg *config.Config
+
        // Client is the object used to operate Kubernetes builtin resources.
        Client kubernetes.Interface
        // APISIXClient is the object used to operate resources under 
apisix.apache.org group.
        APISIXClient clientset.Interface
-       // SharedIndexInformerFactory is the index informer factory object used 
to watch and

Review comment:
       ```
   // in controller
   // re-execute this code will make panic `close of closed channel` when 
context cancelled
   // unless you re-create Informer
   **Informer.Run(ctx.Done())
   ```
   
   So should re-create **Informer in every controller.run. It need re-create 
InformerFactory.




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to