konfig icon indicating copy to clipboard operation
konfig copied to clipboard

Feature Request - Add option to remove configs too

Open vikas027 opened this issue 4 years ago • 2 comments

Thanks for the handy plugin. Please enable the option to delete/remove configs too

In other words, something similar to the below commands

kubectl config delete-cluster my-cluster
kubectl config delete-context my-cluster-context
kubectl config unset users.my-cluster-admin

vikas027 avatar Apr 25 '20 04:04 vikas027

That's a nice idea. Do you miss this functionality in general or for konfig in particular? I'm asking because other plugins have already solved this problem quite nicely I think. For example, kubectx is pretty good.

FWIW, I think delete-cluster is dangerous or not easy to implement properly: the cluster could be referenced in several contexts and it is ambiguous what people expect to happen. IMO, better err on the safe side which means not deleting if it is referenced. And then it's not better than delete-context anymore, but more complex to implement.

corneliusweig avatar Apr 28 '20 20:04 corneliusweig

Hey @corneliusweig ,

Yeah, I know some other projects have done the same but it would be good to have everything at one place.

FWIW, I think delete-cluster is dangerous or not easy to implement properly: the cluster could be referenced in several contexts and it is ambiguous what people expect to happen. IMO, better err on the safe side which means not deleting if it is referenced. And then it's not better than delete-context anymore, but more complex to implement.

I understand that this could be a bit disastrous if not done properly, but we can always have automatic backups which people can roll back if they wish to.

Overall, I leave it to you. To me, it makes sense to have this feature, especially when dealing with al lot ephemeral clusters at times.

vikas027 avatar Apr 29 '20 02:04 vikas027