omrikiei / ktunnel

A cli that exposes your local resources to kubernetes
GNU General Public License v3.0
925 stars 71 forks source link

ktunnel `--tls` should set `traefik.ingress.kubernetes.io/service.serversscheme: https` annotation #69

Open erulabs opened 2 years ago

erulabs commented 2 years ago

Hello!

I've been loving ktunnel, and just started using it with a cluster that uses Traefik. I spent a full 3 hours trying to figure out how to get the Ingress system to pass HTTPS thru my ktunnel service, and finally found out that the service needs to have an annotation that hints to Traefik that the service speaks TLS.

When using --tls option, the service should be created with the traefik.ingress.kubernetes.io/service.serversscheme: https annotation, which would make Traefik ingresses pointing at the service work properly.

Honestly, this seems more like a failure on Traefik's side, but since adding an annotation is a harmless and very light change, it seems like a nice convenience that ktunnel could add.

Feel free to close this if you don't think ktunnel should deal with this - I have mixed feelings. It's not "correct", but it certainly would have saved me a lot of time.

omrikiei commented 2 years ago

How about if we add a flag that can be used to set a custom flag to the manifests?