omrikiei / ktunnel

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

`ktunnel expose` deadlocks when it fails to listen for port forwarding and ignores SIGINT #129

Closed jboewer closed 2 weeks ago

jboewer commented 3 weeks ago

When the port to establish port forwarding is already in use, ktunnel goes into deadlock and does not respond to SIGINT

ktunnel expose fooservice 9003:9003
INFO[0004] Exposed service's cluster ip is: XXXXXXXXXXXXXXX 
INFO[0004] ProgressDeadlineInSeconds is currently 600s. It may take this long to detect a deployment failure. 
INFO[0004] waiting for deployment to be ready           
INFO[0012] deployment "fooservice" successfully rolled out 
INFO[0012] port forwarding to XXXXXXXXXXXXXXXXXXXXXXXXX 
INFO[0012] Waiting for port forward to finish           
ERRO[0012] unable to listen on any of the requested ports: [{28688 28688}] 
^C
INFO[0026] Got exit signal, closing client tunnels and removing k8s objects 
INFO[0026] Deleting service fooservice                  
INFO[0026] Deleting deployment fooservice               
^C^C^C^C

And then hangs indefinitely.

jboewer commented 1 week ago

Hey @omrikiei,

Is there a schedule for when the latest changes will be released in a new version? I guess this is far from critical but am just curious :)

Cheers