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 multiple GatewayClass #1231

Closed
arkodg opened this issue Mar 27, 2023 · 15 comments · Fixed by #2298
Closed

Support multiple GatewayClass #1231

arkodg opened this issue Mar 27, 2023 · 15 comments · Fixed by #2298
Assignees
Labels
area/infra-mgr Issues related to the provisioner used for provisioning the managed Envoy Proxy fleet. kind/enhancement New feature or request no stalebot priority/high Label used to express the "high" priority level road-to-ga
Milestone

Comments

@arkodg
Copy link
Contributor

arkodg commented Mar 27, 2023

Description:
Today, Envoy Gateway only supports a single GatewayClass. This decision was taken to simplify logic, limit permissioning and ensure sensitive material is isolated (across tenants) before dealing with multi tenancy (each GatewayClass is a tenant).

Our proposed alternate solution is to request users to create another Envoy Gateway controller with a different name in a the same cluster in a different namespace and link the newer GatewayClass to it

Keeping this issue open to gather feedback from users.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had activity in the last 30 days.

@github-actions github-actions bot added the stale label Apr 26, 2023
@wondersd
Copy link
Contributor

wondersd commented Jul 7, 2023

Hi all,

I think it would be great if multiple GatewayClasses could be managed such that one controller is able to handle multiple "tenants" or even diverse Gateway instances within one logical "tenant". As it stands today, even with multiple EG controllers for each logical tenant, team X or environment Y, is still bound to only creating uniform Gateway instances within that tenant. If they wish to segregate internally for different purposes, e.g. internal vs external, or a critical service like an exposed database vs more forgiving lightweight api calls, they would have to install multiple EG controllers.

The resources allocated to it are dependent on what services are being proxied though it and are not 'automatic' as one may get via a cloud managed LB (like GKE's provided gateway api implementation mapping to GCE LB instances). If there is only ever one Gateway per GatewayClass then all is well. But trying to use multiple Gateway per GatewayClass one is not able to manage parameters of each envoy proxy cluster in accordance to what each separate Gateway is doing.

Having each "tenant" install a EG controller would require each tenant to have some higher level permissions to the cluster per each tenant, e.g. creating ClusterRole ClusterRoleBindings for the individualized EG controller or having to coordinate with a cluster administrator. In the case of many "tenants" or a high churn of "tenants" this is not easily manageable. This starts to lead down the road of installing a helm chart (or equivalent) per managed envoy proxy instance. Which, to me atleast, seems a bit underwhelming for the controller/operator model as its seen as a mechanism to provide "infrastructure as a service" within the k8s ecosystem. Here, providing a uniform service for managing envoy proxy clusters as defined by the gateway api spec.

I think it would be nice to either be able to specify some sort of glob pattern for watched controllerName like gateway.envoyproxy.io/*

and/or making

apiVersion: config.gateway.envoyproxy.io/v1alpha1
kind: EnvoyGateway

a full CRD where those wanting to make GatewayClass would also need permissions to create/manage EnvoyGateway to map the new controllerName to watch for

Thank you all for working on this and would love to see this continue to get better!

@arkodg
Copy link
Contributor Author

arkodg commented Jul 7, 2023

thanks for the feedback @wondersd !

  • the first limitation that we can try and remove is attaching a EnvoyProxy resource to a Gateway, similar to what is done at the GatewayClass level today. This has been defined upstream https://gateway-api.sigs.k8s.io/geps/gep-1867/ and once the API moves to Experimental, we should be able to support it in the project. This will allow teams to have heterogeneous data plane (envoy proxy fleet) infrastructure while still being linked to the same GatewayClass

@arkodg arkodg removed the stale label Jul 7, 2023
@wondersd
Copy link
Contributor

@arkodg Thanks for the quick response! Any notion of how parameterRef on the Gateway will be used in EG? Would we expect that both could be used for a "default/template + override" or will EG shift to only expect parameterRefs attached to Gateway or something else?

For what its worth I think having multiple GatewayClasses could still be useful here even if one can customize each Gateway instance via parameterRefs. A cluster administrator could setup GatewayClass to abstract some of the details of the cluster. For example a GatewayClass instance called eg-internal on say an EKS cluster that specifically maps the envoy proxy service to be behind an NLB that is mapped to a set of subnets dedicated for such internal load balancers. Those making Gateway instances who are not the cluster administrators would be able to instance this class without needing to know the specifics of the cluster lower level setup while still being able to further customize each instance of said class for their needs.

I suppose one could fall back to multiple controller installs for the above, which in practice would probably be fine as the cluster administrator defining such GatewayClass instances would be the same role setting up the controllers in the first place.

Hope this is helpful, thanks for hearing me out!

@arkodg
Copy link
Contributor Author

arkodg commented Jul 10, 2023

Thanks for the quick response! Any notion of how parameterRef on the Gateway will be used in EG? Would we expect that both could be used for a "default/template + override" or will EG shift to only expect parameterRefs attached to Gateway or something else?

  • This was discussed in the community meeting and @AliceProxy, @kflynn and I agreed that this would be supported on both the GatewayClass & Gateway with the value in Gateway taking precedence if parametersRef was set on both the resources, which is also in line with the above GEP's recommendations.

regarding your request for multiple GatewayClasses being supported by EnvoyGateway, its def a valid use case that this project should eventually support and this issue should be used to track its completion.

thanks again for sharing your feedback !

@github-actions
Copy link

github-actions bot commented Aug 9, 2023

This issue has been automatically marked as stale because it has not had activity in the last 30 days.

@arkodg
Copy link
Contributor Author

arkodg commented Nov 10, 2023

will need to prioritize this one, since there are no concrete plans in upstream to support an arbitrary infra extension point such as parametersRef in the Gateway so supporting the pattern of multiple GatewayClass with each one attaching a unique EnvoyProxy inside the parametersRef seems like the only option for now

@arkodg
Copy link
Contributor Author

arkodg commented Nov 10, 2023

if we implemented this, this should make #1851 redundant

@arkodg
Copy link
Contributor Author

arkodg commented Nov 10, 2023

cc @cnvergence curious if you're interested in looking at this since its similar to the MergeGateways feature

@cnvergence
Copy link
Member

@arkodg sounds good to me, I will pick it up once I will have some spare time

@arkodg
Copy link
Contributor Author

arkodg commented Nov 13, 2023

awesome thanks @cnvergence

@arkodg arkodg added the area/infra-mgr Issues related to the provisioner used for provisioning the managed Envoy Proxy fleet. label Nov 13, 2023
@Xunzhuo
Copy link
Member

Xunzhuo commented Dec 6, 2023

Hey @cnvergence, kindly ping for the status of the issue, are you still working on this : )

@Xunzhuo Xunzhuo added this to the v1.0.0-rc1 milestone Dec 6, 2023
@Xunzhuo Xunzhuo added road-to-ga priority/high Label used to express the "high" priority level labels Dec 6, 2023
@cnvergence
Copy link
Member

hey @Xunzhuo, sorry, did not move it forward lately, but now I will be able to have more time for it, so I would like to focus on this subject :)

@Xunzhuo
Copy link
Member

Xunzhuo commented Dec 6, 2023

Thank you @cnvergence, since it is an important feature in the next milestone, so just kindly ping you.

Copy link

github-actions bot commented Jan 5, 2024

This issue has been automatically marked as stale because it has not had activity in the last 30 days.

@github-actions github-actions bot added the stale label Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/infra-mgr Issues related to the provisioner used for provisioning the managed Envoy Proxy fleet. kind/enhancement New feature or request no stalebot priority/high Label used to express the "high" priority level road-to-ga
Projects
Development

Successfully merging a pull request may close this issue.

5 participants