File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626def load_config (** kwargs ):
2727 """
2828 Wrapper function to load the kube_config.
29- It will initially try to load_kube_config from provided path, then check if the KUBE_CONFIG_DEFAULT_LOCATION exists
30- If neither exists- it will fall back to load_incluster_config and inform the user accordingly.
29+ It will initially try to load_kube_config from provided path,
30+ then check if the KUBE_CONFIG_DEFAULT_LOCATION exists
31+ If neither exists- it will fall back to load_incluster_config
32+ and inform the user accordingly.
3133
32- :param kwargs: A combination of all possible kwargs that can be passed to either load_kube_config or
34+ :param kwargs: A combination of all possible kwargs that
35+ can be passed to either load_kube_config or
3336 load_incluster_config functions.
3437 """
3538 if "kube_config_path" in kwargs .keys () or os .path .exists (
3639 KUBE_CONFIG_DEFAULT_LOCATION ):
3740 load_kube_config (** kwargs )
3841 else :
3942 print (
40- "kube_config_path not provided and default location ({0}) does not exist. "
41- "Using inCluster Config. This might not work." .format (KUBE_CONFIG_DEFAULT_LOCATION ))
43+ "kube_config_path not provided and "
44+ "default location ({0}) does not exist. "
45+ "Using inCluster Config. "
46+ "This might not work." .format (KUBE_CONFIG_DEFAULT_LOCATION ))
4247 load_incluster_config (** kwargs )
You can’t perform that action at this time.
0 commit comments