cuber-cloud / cuber-gem

An automation tool that simplify the deployment of your apps on Kubernetes.
https://cuber.cloud
Apache License 2.0
656 stars 24 forks source link

Add an option to deploy neither a LoadBalancer nor an Ingress #17

Open zonque opened 6 months ago

zonque commented 6 months ago

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?

collimarco commented 6 months ago

Do you have any special reasons to use Traefik?

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

zonque commented 6 months ago

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

zonque commented 6 months ago

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

asimmons91 commented 1 month ago

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: