Skip to content

Commit e75468e

Browse files
author
董家效
committed
fix issue #1782 Resolve load_kube_config TMP file issue
1 parent 0553bba commit e75468e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

kubernetes/base/config/kube_config.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,8 @@ def list_kube_config_contexts(config_file=None):
789789

790790
def load_kube_config(config_file=None, context=None,
791791
client_configuration=None,
792-
persist_config=True):
792+
persist_config=True,
793+
temp_file_path=None):
793794
"""Loads authentication and cluster information from kube-config file
794795
and stores them in kubernetes.client.configuration.
795796
@@ -800,14 +801,16 @@ def load_kube_config(config_file=None, context=None,
800801
set configs to.
801802
:param persist_config: If True, config file will be updated when changed
802803
(e.g GCP token refresh).
804+
:param temp_file_path: store temp files path.
803805
"""
804806

805807
if config_file is None:
806808
config_file = KUBE_CONFIG_DEFAULT_LOCATION
807809

808810
loader = _get_kube_config_loader(
809811
filename=config_file, active_context=context,
810-
persist_config=persist_config)
812+
persist_config=persist_config,
813+
temp_file_path=temp_file_path)
811814

812815
if client_configuration is None:
813816
config = type.__call__(Configuration)

0 commit comments

Comments
 (0)