cuber-gem icon indicating copy to clipboard operation
cuber-gem copied to clipboard

Add an option to deploy neither a LoadBalancer nor an Ingress

Open zonque opened this issue 1 year ago • 4 comments

In setups with Traefik Ingressroutes, a LoadBalancer is deployed by Traefik. When Cuber installs its own one next to it, is is ignored as long as the one that is already active has bound the external ports already. As soon as Traefik is restarted however, the dormant Cuber managed LoadBalancer pops to life which leads to all IngressRoutes being ignored.

Setting ingress: true in the Cuberfile leads to an Ingress living next to the Ingressroutes which then acts as a default catch for all requests that are not matched by Traefik, which is dangerous in case certain paths are protected by middlewares Ingressroutes rules.

For such setups, the only sane thing is not to touch the ingress side at all and deploy neither a LoadBalancer nor an Ingress, but there is currently no option to do that. Could that be added?

zonque avatar Apr 28 '24 06:04 zonque

Do you have any special reasons to use Traefik?

Why can't you use a normal load balancer or ingress?

collimarco avatar Apr 28 '24 11:04 collimarco

Traefik is the default shipped by k3s. I'm using many features of it and I would like to keep it.

zonque avatar Apr 28 '24 17:04 zonque

FWIW, I am tracking the changes needed to make Cuber work with k3s here.

zonque avatar May 13 '24 18:05 zonque

I actually ran into this too while getting my rails app deployed on a k3s cluster.

My workaround was to deploy it with a basic ClusterIP service and wire up the ingress myself outside of Cuber.

I opened a PR with the changes I made, https://github.com/cuber-cloud/cuber-gem/pull/19. Let me know what you think and feel free to close it out if it doesn't make sense to add to the main project. :slightly_smiling_face:

asimmons91 avatar Sep 21 '24 16:09 asimmons91