kwt icon indicating copy to clipboard operation
kwt copied to clipboard

Flag to automatically clean up

Open braunsonm opened this issue 5 years ago • 4 comments

Describe the problem/challenge you have It would be nice to have a flag like --rm which you can pass to start to automatically clean up when you Cntrl+C.

Describe the solution you'd like A --rm (or similar) flag for start to cleanup the secrets and pod when kwt is interrupted

braunsonm avatar Dec 18 '20 15:12 braunsonm

Thanks for the suggestion! To be clear, are you referring to kwt net start when you say the start command?

Can you share some more about what you'd like cleaned up? What's being left behind that you need to manually remove or is causing issues? For my own benefit, what workflow are you following which lead to this desired feature?

StevenLocke avatar Dec 18 '20 18:12 StevenLocke

Hi Steven, Yes I mean kwt net start

For instance when I'm trying to debug something and jump into a namespace with sudo -E kwt net start -n namespace it creates a kwt pod in that namespace to tunnel my traffic through. When I'm done I Ctrl+C to stop the network but the pod is left behind. It would be nice if there was a way to have the pod cleaned up after I disconnect rather than manually running the cleanup command after. More so just a quality of life feature :)

braunsonm avatar Dec 18 '20 19:12 braunsonm

I think I get it!

You're interested in a flag that could be passed to kwt net start which would perform the functionality of kwt net clean-up after terminating the command. Is that correct?

StevenLocke avatar Dec 18 '20 19:12 StevenLocke

Exactly!

braunsonm avatar Dec 18 '20 19:12 braunsonm