Open Itaykal opened 2 weeks ago
I'm failing to understand the use case for this. I never needed something like this and fzf does a good job of filtering the same results without introducing a flag with the same amount of keystrokes, no?
I'm failing to understand the use case for this. I never needed something like this and fzf does a good job of filtering the same results without introducing a flag with the same amount of keystrokes, no?
Well yes but actually no, I want to be able to create the following aliases:
kx=kubectx -q <staging-context-identifier>
kxp=kubectx -q <production-context-identifier>
And create some "segregation" between context "types", in order to avoid logging in to the wrong cluster
I think you're trying to solve the problem at the wrong layer. I recommend segregating by different kubeconfig files entirely.
Also, this sort of problem won't solve accidents you're trying to prevent. Speaking from experience, a writable context entry is always a recipe for disaster.
At any rate, I don't think this concern should be addressed at this tool, and if you use separate kubeconfig files it would work with this tool with no modifications.
Behaviour
will output: