jordanwilson230 / kubectl-plugins

A Collection of Plugins for kubectl Integration (exec as any user, context switching, etc).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove dependency on .bash_profile (or other profiles)

Jefferson-Faseler opened this issue · comments

Hi! Thanks for starting such a cool project! I'm already getting excited just thinking about all the possibilities.

Is your feature request related to a problem? Please describe.
I have just started using kubectl-plugins and keep forgetting to reload my terminal or open a new terminal tab. It would be great to remove some of the acrobatics required to get my clusters and namespaces protected.

Describe the solution you'd like
A simple config file living in $HOME would probably do the trick. Could get really fancy with it and even scope namespaces to clusters, give clusters shorthand names (some gke clusters have some serious character counts), and add the container registry there as well.

The only dependency on the .bash_profile (or .zshrc if Zsh support is added down the road 😜 ) would be to add the initial function.

Describe alternatives you've considered
Changing my habits and re-sourcing more often.

Additional context
I've done similar things to this before in other kubernetes projects I've done and it worked well. It was with higher-level languages, but it would still be possible for these use cases I believe.

I doubt you want to make dependencies on tools like jq or yq but something like that would make this feature request extremely easy to accomplish. Confirming some GNU/BSD compatibility could be crucial.