6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2025-01-05 23:20:40 +00:00

fix: load kube config from file

Close #860
This commit is contained in:
Régis Behmo 2023-06-16 11:38:59 +02:00 committed by Régis Behmo
parent 2dae85807f
commit b2067ce1f6
2 changed files with 4 additions and 1 deletions

View File

@ -0,0 +1 @@
- [Bugfix] Fix loading default Kubernetes config. (by @regisb)

View File

@ -27,7 +27,9 @@ class K8sClients:
# pylint: disable=import-outside-toplevel
from kubernetes import client, config
if os.path.exists(config.kube_config.KUBE_CONFIG_DEFAULT_LOCATION):
if os.path.exists(
os.path.expanduser(config.kube_config.KUBE_CONFIG_DEFAULT_LOCATION)
):
# found the kubeconfig file, let's load it!
config.load_kube_config()
elif (