Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nginx] Support for multiple Namespaces #732

Closed
ghost opened this issue May 18, 2017 · 7 comments
Closed

[nginx] Support for multiple Namespaces #732

ghost opened this issue May 18, 2017 · 7 comments

Comments

@ghost
Copy link

ghost commented May 18, 2017

Currently it is possible to use Ingresses either from all namespaces or from one individual namespace (--force-namespace-isolation). In our environment we only have the rights to access all namespaces except kube-system, so it's not possible to retrieve Ingresses cluster-wide.

It would really help if it would be possible to specify a list of namespaces from which the Nginx Ingress Controller retrieves Ingress. The only alternative for us, would be to deploy one Ingress Controller per namespace.

@aledbf
Copy link
Member

aledbf commented May 18, 2017

@stefanbueringer sadly this is not possible. This is a restriction of the library we use to reach api server (client-go). In particular the expose API provides an abstraction called informer, click here to see an example, where only is possible to specify one particular namespace (as filter) or get information about all the existing namespaces.

The only alternative for us, would be to deploy one Ingress Controller per namespace.

This is the correct way to handle this scenario.

@aledbf aledbf closed this as completed May 18, 2017
@aledbf aledbf added the wontfix label May 18, 2017
@ghost
Copy link
Author

ghost commented May 18, 2017

@aledbf I guess creating one informer per object type and one for every namespaces is no real option here.

@aledbf
Copy link
Member

aledbf commented May 18, 2017

@stefanbueringer no because the informers are not created dinamically.
Please check https://github.com/kubernetes/ingress/blob/master/core/pkg/ingress/controller/controller.go#L275-L297

@ghost
Copy link
Author

ghost commented May 18, 2017

@aledbf I'm aware how its currently implemented. I guess creating these informers dynamically per namespaces (e.g. by looping over the namespaces) is either a bad hack or just not possible with Go (I'm new to the Go language)

@aledbf
Copy link
Member

aledbf commented May 18, 2017

I guess creating these informers dynamically per namespaces (e.g. by looping over the namespaces)

This is not a good idea because each informer instance consumes resources in the api server (basically we use watch) and also please keep in mind that making this change adds an unnecessary complexity to the code (we need to merge all the information stored in the informers to build one configuration)

@ghost
Copy link
Author

ghost commented May 19, 2017

Ok thx for the information, that makes sense.

@skonto
Copy link

skonto commented Apr 5, 2019

I think this feature would be pretty useful for operators and the multi-tenancy story but it could be provided by the k8s watch api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants