-
Notifications
You must be signed in to change notification settings - Fork 13
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 multiple and arbitrary gateways #102
Comments
Great Job! Thank you! |
Thanks for the proposal @maxgio92 - very well formulated! It is currently possible to deploy multiple gateways but each of the would be bound to a particular namespace or using different labels/annotations (see helm chart). I would like to keep compatibility with todays annotations. This might be achieved by adding ´setGatewayAnnotationValue´ in addition to the existing |
Sure, let us go point by point:
the default value for
almost - it requires different
It would require 100 admission controller containers + 100 gateways. This could be reduced to "just" 1 admision controller + 100 gateways but it could lead to have to support multiple configurations in the same admission controller. At the minimum the gateway IP would be different but excluded routed networks or the NATted ports might be different as well.
Right, this is how others do it currently as they "only" have 2 or perhaps 3gateways and not 100.
The name of the gateway deployment matches the name of the helm instance. Therefore it should be possible to deploy multiple instances in the same namespace. So in summary: you are right that some resources might be saved by having a common admission controller for multiple gateways but this would come with the trade off of more complicated settings. So if you have an use case for it I would not mind considering a PR but if you are only planning a few it might not be worth the effort. |
Thank you @angelnu (I think you put your answer inside my comment :/). I think we can go this way: I can open a PR with the simple implementation you proposed which has the minor impact, as of now.
in order to, not only require that the label/annotation of which the key is specified by the flag For example, in order to have multiple gateways:
WDYT? |
Sorry for commenting in directly in your post and not in a copy x-/ I agree with your proposal. So please go ahead. The helm chart will also need an update to expose the new parameter. |
Thanks for the PR! Would you be able to do a PR to Helm chart as well? |
Thank you @angelnu. Sure, I'll take care of it |
Details
Describe the solution you'd like:
Add support for having multiple pod-gateways inside a single cluster and allow the end-user, to select for each client application which pod-gateway set as the default gateway for the client application's pods.
Anything else you would like to add:
Implementation
Gateway service name as annotation
At Pod level
In the simpler form, and allowing the application owner - who, in a DevOps way, would be responsible for configuring their own application's deployment - this could be implemented through annotations at pod-level.
The mutating admission wehbook would inject the
$gateway
environment variable to client pods' init and sidecar containers.You can see a draft implementation here.
At Namespace level
Assuming the following:
an annotation that would hint which gateway to use as Kubernetes Service name, could be applied at Namespace-level.
The mutating admission wehbook would inject the
$gateway
environment variable to client pods' init and sidecar containers.Other
Obviously the way the feature could be achieved is not limited to the above proposed approaches.
Additional Information:
The VXLAN CIDR blocks, for each VXLAN static network (one per gateway) might be able to overlap and this shoudn't be a problem.
This is just a screenshot that shows client pods on the left panes, and gateway pods on the right panes.
The top panes represent a tunnel separated from the bottom one.
The client of which the shells on the left, knows from the
$gateway
environment variable, from the headless KubernetesService
, the pod-gateway pod-network's IP (from which the init container build the Linux bridge FDB rule):pod-gateway-a
andpod-gateway-b
are the KubernetesService
object names that have thepod-gateway-a
andpod-gateway-b
deployment with one replica, residing in thegateway-system
Namespace
:As you can see the gateway VXLAN IPs overlap (i.e. 172.16.0.1) but the Linux FDB together with VXLAN capabilities of the device (drivers) manage for dedicated MAC addresses.
More: multiple clients per each gateway and IP management
In the example scenario of the screenshot above, client VXLAN IP addresses have been statically assigned.
DHCP, of which server and client setup already provided by the pod-gateway feature set, can manage them.
The text was updated successfully, but these errors were encountered: