tokers commented on issue #139:
URL:
https://github.com/apache/apisix-ingress-controller/issues/139#issuecomment-752333608
We need the capable to configure the watched namespaces from command line
options and configuration file.
For command line options, we can add a `--watch-namespace` option.
```
apisix-ingress-controller ingress --watch-namespace bookinfo
--watch-namespace default --watch-namespace apisix-gw
```
For configuration file, add a `watch_namespaces` array.
```yaml
kubernetes:
watch_namespaces:
- bookinfo
- default
- apisix-gw
```
`SharedIndexInformerFactory` can be created with only one namespace, it's
not so strong to satisfy some complex deployments. so we may need to watch
resources in all namespaces, but drop some of them if the namespace is not
desired when get events from informers. Say the route, we should add the
namespace filtering here:

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