omrikiei / ktunnel

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

Clean up unused resources #25

Open tamasfe opened 4 years ago

tamasfe commented 4 years ago

After using ktunnel expose and an unexpected shutdown the deployment and the service will stay in the cluster indefinitely.

There could be something like a ktunnel clean or ktunnel reconnect. Alternatively there could be a timeout after which the resources delete themselves if the connection is lost to the client, I'm not sure if this is possible.

This is not a must have feature, but it would be nice.

P.S.: This tool has been very handy so far, thanks for creating it!

omrikiei commented 4 years ago

I think that the clean up procedure can be improved to guarantee successful cleanup in almost every run, but it needs to remain in the context of the same command run, and not in a new command

tamasfe commented 4 years ago

I could imagine a --force param for expose to run the teardown before everything if the service/deployment already exists.