click icon indicating copy to clipboard operation
click copied to clipboard

use kube current-context when entering click

Open clux opened this issue 6 years ago • 1 comments

Hey, this tool is pretty awesome thanks a lot!

Not sure if this is a sensible suggestion or not, but it feels like a semi-common pattern to have some quick shell helpers to swap kubectl config current-context around for kubectl.

Was wondering if it is possible to have click use my current context (and its associated namespace if set in the context triple) when entering instead of storing it in the click config? It feels a bit overkill to have this info set in two places personally, and it also slightly deceptive to someone who has their kube context on PS1.

If people set contexts carefully to point to specific clusters with specific namespaces, then it's easier to just swap the context outside click than it is to do it interactively. The repl prompt showing the context and the namespace set is a very nice touch though.

clux avatar Mar 27 '18 22:03 clux

This seems pretty reasonable. I'll need to think about how to have this interact with click's own idea about what context it's in, but should be able to work something out that makes sense.

Thanks for the suggestion!

nicklan avatar Mar 28 '18 03:03 nicklan