Skip to content

Commit 1e60636

Browse files
committed
Fix #2045 Delete the duplicate line of configuration.host
1 parent b6b2e09 commit 1e60636

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

kubernetes/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ configuration.api_key['authorization'] = 'YOUR_API_KEY'
6060
# Defining host is optional and default to http://localhost
6161
configuration.host = "http://localhost"
6262

63-
# Defining host is optional and default to http://localhost
64-
configuration.host = "http://localhost"
6563
# Enter a context with an instance of the API kubernetes.client
6664
with kubernetes.client.ApiClient(configuration) as api_client:
6765
# Create an instance of the API class

kubernetes/base/config/__init__.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ def load_config(**kwargs):
2828
then check if the KUBE_CONFIG_DEFAULT_LOCATION exists
2929
If neither exists, it will fall back to load_incluster_config
3030
and inform the user accordingly.
31-
3231
:param kwargs: A combination of all possible kwargs that
3332
can be passed to either load_kube_config or
3433
load_incluster_config functions.
@@ -40,12 +39,10 @@ def load_config(**kwargs):
4039
load_kube_config(**kwargs)
4140
elif exists(expanduser(KUBE_CONFIG_DEFAULT_LOCATION)):
4241
load_kube_config(**kwargs)
43-
elif "config_dict" in kwargs:
44-
load_kube_config_from_dict(**kwargs)
4542
else:
4643
print(
47-
"config_file not provided and "
44+
"kube_config_path not provided and "
4845
"default location ({0}) does not exist. "
4946
"Using inCluster Config. "
5047
"This might not work.".format(KUBE_CONFIG_DEFAULT_LOCATION))
51-
load_incluster_config(**kwargs)
48+
load_incluster_config(**kwargs)

0 commit comments

Comments
 (0)