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

Support for managing multiple namespaces #917

Open
arun11299 opened this issue Apr 9, 2022 · 5 comments
Open

Support for managing multiple namespaces #917

arun11299 opened this issue Apr 9, 2022 · 5 comments

Comments

@arun11299
Copy link

Opening this ticket based on discussion in https://groups.google.com/g/haproxy-ingress/c/ittshTi03C4

Application deployment scenario:

  1. Multiple services are running in different namespaces.
  2. HAProxy IC needs to be configured to listen for all these namespaces and also add it to its backend configuration.
  3. There should not be any need to provide cluster level access.

Currently HAProxy can watch for only a single namespace with force isolation.

Expectations from this request:

  1. Support for managing multiple namespaces.
  2. An example of how to deploy. For eg: Where should the ingress configuration should be for multiple namespaces, service account config required and the new command line arguments if any.

Thanks.

@arun11299
Copy link
Author

Hello @jcmoraisjr , Is there any way you can tell me when this could get implemented looking at your backlog and other priorities ?

@jcmoraisjr
Copy link
Owner

Hi, this is a probably somewhat simple and low/mid impact implementation. I'm also interested in it and maybe it can fit in the v0.15 release.

Regarding releases we've v0.15 planned to Q2 but it will probably delay, so lets use Q3 as a reference. v0.16 is planned to early Q1/23. The priority for v0.15 is full gateway api support which needs some deep refactors in the controller, actually being implemented.

I'll probably add some other features and improvements while stabilizing the gateway api code so we can have multiple namespaces as well. If so, we can say it's usable in Q3. If not, v0.16 is a good candidate and early Q1/23 is the date.

Maybe you have some go and k8s' client-go skills, the place I'd start to see is the lister, see below. I don't know yet if the informer factory has support to a list of namespaces or if I need to create a couple of informers, and even the later shouldn't be that hard to design.

clusterWatch := watchNamespace == api.NamespaceAll
clusterOption := informers.WithTweakListOptions(nil)
namespaceOption := informers.WithNamespace(watchNamespace)
var ingressInformer, resourceInformer, localInformer informers.SharedInformerFactory
if clusterWatch {
ingressInformer = informers.NewSharedInformerFactoryWithOptions(client, resync, clusterOption)
resourceInformer = ingressInformer
} else if isolateNamespace {
ingressInformer = informers.NewSharedInformerFactoryWithOptions(client, resync, namespaceOption)
resourceInformer = ingressInformer
} else {
ingressInformer = informers.NewSharedInformerFactoryWithOptions(client, resync, namespaceOption)
resourceInformer = informers.NewSharedInformerFactoryWithOptions(client, resync, clusterOption)
}

@jcmoraisjr jcmoraisjr added this to the v0.15 milestone May 7, 2022
@arun11299
Copy link
Author

@jcmoraisjr Thanks. Yes, if possible I would like to take it up. But, it will take some time for me to get started up on this. Hopefully its fine even if it doesn't make it to 0.15 milestone ?

@jcmoraisjr
Copy link
Owner

No problem, take your time, thanks! I'll let you know about any progress from my side updating this issue.

@jcmoraisjr
Copy link
Owner

@arun11299 just to let you know that I'll need to bring the controller-runtime migration to v0.15 and this will completely change how the current listers and informers work. I'll update this issue as soon as I have some useful code, in the mean time I think it doesn't worth the effort of try to evolve the current codebase.

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

No branches or pull requests

2 participants