keep config_file value

This commit is contained in:
2022-12-21 06:58:51 +00:00
parent ab478a309f
commit 6764e8d7dd

View File

@ -33,7 +33,9 @@ def load_config(**kwargs):
can be passed to either load_kube_config or
load_incluster_config functions.
"""
if "kube_config_path" in kwargs.keys():
if "config_file" in kwargs.keys():
load_kube_config(**kwargs)
elif "kube_config_path" in kwargs.keys():
kwargs["config_file"] = kwargs.pop("kube_config_path", None)
load_kube_config(**kwargs)
elif exists(expanduser(KUBE_CONFIG_DEFAULT_LOCATION)):