omrikiei / ktunnel

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

Exit with error when portforward fails #127

Closed levtomer66 closed 2 months ago

levtomer66 commented 6 months 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 5 months 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.