omrikiei / ktunnel

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

Exit with error when portforward fails #127

Open levtomer66 opened 1 month ago

levtomer66 commented 1 month ago

For example when starting expose with the same port: ktunnel is stuck: ERRO[0005] unable to listen on any of the requested ports: [{28688 28688}]

Instead exit with error

jboewer commented 4 weeks ago

We are encountering this issue as well. Instead of using ktunnel as a standalone executable, we integrate it as a module within our application.

The suggested implementation, which calls log.Fatal(err) and subsequently os.Exit(1), would complicate error handling.