carvel-dev / kwt

Kubernetes Workstation Tools CLI
Apache License 2.0
157 stars 12 forks source link

Flag to automatically clean up #25

Open braunsonm opened 3 years ago

braunsonm commented 3 years ago

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

StevenLocke commented 3 years ago

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?

braunsonm commented 3 years ago

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 :)

StevenLocke commented 3 years ago

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?

braunsonm commented 3 years ago

Exactly!