microsoft / mindaro

Bridge to Kubernetes - for Visual Studio and Visual Studio Code
MIT License
307 stars 106 forks source link

KUBECONFIG env var is a list #254

Closed himslm01 closed 2 years ago

himslm01 commented 2 years ago

Describe the bug As described here: https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#set-the-kubeconfig-environment-variable "The KUBECONFIG environment variable is a list of paths to configuration files." I therefore expect the Bridge to Kubernetes to parse it like a list, and to use the contents of all the files it points to. I do not expect to see the error:

Failed to configure Bridge to Kubernetes:
Failed to get the current context from the kubeconfig:
No kubeconfig file found at path
/Users/mark/.kube/config:/Users/mark/.kube/config.d/home/config:/Users/mark/.kube/config.d/work/config

To Reproduce Set the KUBECONFIG variable in your environment to a list of config files Start VS Code Use the Kubernetes plugin to navigate to a pod Right click on the pod and select "Debug (Local tunel)" See the error message

Environment Details Client used (VS Code/Visual Studio): $ /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code --list-extensions --show-versions | grep "mindaro.mindaro"

mindaro.mindaro@1.0.120210803

$ /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code --version

1.62.3
ccbaa2d27e38e5afa3e5c21c1c7bef4657064247
x64

macOS 11.6.1 (20G224)

amsoedal commented 2 years ago

Hi @himslm01, thanks for reporting. We do need to fix this but can't commit to a timeline at the moment. Closing as this is tracked by #88