Closed tsaarni closed 5 years ago
Adds support for setting config path with KUBECONFIG
Currently kubectl-grep does not obey KUBECONFIG environment variable:
$ export KUBECONFIG=myconfig $ kubectl grep pod Fatal: Unable to open /home/tsaarni/.kube/config
Expected behavior is to use config pointed by KUBECONFIG environment variable.
This PR constructs config by using NewDefaultClientConfigLoadingRules() from client-go, which has expected behavior.
NewDefaultClientConfigLoadingRules()
@tsaarni thanks~
Adds support for setting config path with KUBECONFIG
Currently kubectl-grep does not obey KUBECONFIG environment variable:
Expected behavior is to use config pointed by KUBECONFIG environment variable.
This PR constructs config by using
NewDefaultClientConfigLoadingRules()
from client-go, which has expected behavior.