abrochard / kubel

Emacs extension for controlling Kubernetes with limited permissions
GNU General Public License v3.0
267 stars 44 forks source link

Add option for propagating environment variables #110

Open psibi opened 1 year ago

psibi commented 1 year ago

Right now, kubel works when the apropriate credential is part of ~/.kube. But it doesn't work,if I have KUBECONFIG environment variable pointing out to somewhere else (basically if it's not globally set). If you use something like direnv to have project specific environment variable, kubel doesn't work there. And at work, I usually have separate clusters each being managed in their own directory.

This PR adds supports for propagating environment variables and making kubel working in those environment. For EKS cluster, I have to often propagate some extra environment variables to make it work with kubel:

(kubel-env-variables (list "KUBECONFIG" "AWS_ACCESS_KEY_ID" "AWS_SECRET_ACCESS_KEY"))
abrochard commented 1 year ago

Thank you for submitting this! I left a few comments. Could you also please update the doc to show intended usage?