remove config_file arg check

This commit is contained in:
2022-12-12 06:59:59 +00:00
parent 6da7447d3a
commit ab478a309f

View File

@ -34,9 +34,7 @@ def load_config(**kwargs):
load_incluster_config functions.
"""
if "kube_config_path" in kwargs.keys():
kube_config_path = kwargs.pop("kube_config_path", None)
if "config_file" not in kwargs.keys():
kwargs["config_file"] = kube_config_path
kwargs["config_file"] = kwargs.pop("kube_config_path", None)
load_kube_config(**kwargs)
elif exists(expanduser(KUBE_CONFIG_DEFAULT_LOCATION)):
load_kube_config(**kwargs)