Skip to content

Commit ae43d0c

Browse files
yabeayabea
authored and
yabea
committed
Fix kubernetes-client#1893 Update load config
1 parent 5c2cbff commit ae43d0c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

kubernetes/base/config/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@ def load_config(**kwargs):
3333
can be passed to either load_kube_config or
3434
load_incluster_config functions.
3535
"""
36-
if "kube_config_path" in kwargs.keys() or exists(expanduser(KUBE_CONFIG_DEFAULT_LOCATION)):
36+
if "config_file" in kwargs or exists(expanduser(KUBE_CONFIG_DEFAULT_LOCATION)):
3737
load_kube_config(**kwargs)
38+
elif "config_dict" in kwargs:
39+
load_kube_config_from_dict(**kwargs)
3840
else:
3941
print(
40-
"kube_config_path not provided and "
42+
"config_file not provided and "
4143
"default location ({0}) does not exist. "
4244
"Using inCluster Config. "
4345
"This might not work.".format(KUBE_CONFIG_DEFAULT_LOCATION))

0 commit comments

Comments
 (0)