5 ms·
I am not trying to shit on this, sorry - but can't you achieve the same thing with rudimentary automation, and barring that, rudimentary scripting? This seems t
by JohnMakin 2y ago
I am not trying to shit on this, sorry - but can't you achieve the same thing with rudimentary automation, and barring that, rudimentary scripting? This seems to just be adding y/n prompts to certain contexts. How's that different than a bash wrapper script that does something like this?
context=$(grep "current-context:" ~/.kube/config | grep "*prod*")
if [[ -z ${context} ]]
then
# do the command
else
# do a y/n prompt
fi
Am I missing something?
- Telemaco019 2y agoThanks for the feedback John! You're right, that's pretty much it :) I developed kubesafe because (1) I was tired of tinkering with shell aliases and scripts (especially when I wanted to define protected commands) and (2) I needed something that worked smoothly with all Kubernetes tools like kubectl, helm, kubecolor, etc. Kubesafe is just a convenient way to manage protected commands and contexts. Nothing too fancy! Btw - I also found a kubectl plugin written in Bash that’s similar to what you mentioned, in case you're interested: https://github.com/jordanwilson230/kubectl-plugins/blob/krew/kubectl-prompt https://github.com/jordanwilson230/kubectl-plugins/blob/krew...
- JohnMakin 2y agothanks for the explanation, I like the idea
- Telemaco019 2y agoYou're welcome! And thanks again for the feedback!