planetscale / vitess-operator

Kubernetes Operator for Vitess
Apache License 2.0
301 stars 73 forks source link

[Feature Request] Expose vtgate service by nodeport or load balancer #305

Open tokikanno opened 2 years ago

tokikanno commented 2 years ago

Generally there are 2 ways (nodeport or load balancer) to expose vtgate service to outside of k8s cluster.

Currently the Vitess cluster CRD provides the ServiceOverrides structure for us to tweak some properties of vtgate service. But this structure doesn't provide the capability for tweaking nodeport or load balancer settings.

So the only way for us to expose the vtgate service to outside k8s cluster is to add another layer of ingress gateway over the vtgate. This will cost extra overheads on the mysql connection roundtrip.

So please make it possible to expose vtgate (even other vitess related service) by nodeport or load balancer through vitess cluster CRD.


Related slack thread: https://vitess.slack.com/archives/C0PQY0PTK/p1638621405356000

marf commented 10 months ago

Hello, any news about this?

We want to avoid adding an extra layer of ingress gateway if possible.

ajitspendse commented 6 months ago

Another way to expose the service is to manually change the deployed service to type LoadBalancer or NodePort and (optionally) provide the IP or port to use. However, this also introduces a manual step that is best avoided. Support for different service types (LoadBalancer/NodePort) would be great addition.