Skip to content

fix issue #1782 Resolve load_kube_config TMP file issue #1861

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions kubernetes/base/config/kube_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,8 @@ def list_kube_config_contexts(config_file=None):

def load_kube_config(config_file=None, context=None,
client_configuration=None,
persist_config=True):
persist_config=True,
temp_file_path=None):
"""Loads authentication and cluster information from kube-config file
and stores them in kubernetes.client.configuration.

Expand All @@ -800,14 +801,16 @@ def load_kube_config(config_file=None, context=None,
set configs to.
:param persist_config: If True, config file will be updated when changed
(e.g GCP token refresh).
:param temp_file_path: store temp files path.
"""

if config_file is None:
config_file = KUBE_CONFIG_DEFAULT_LOCATION

loader = _get_kube_config_loader(
filename=config_file, active_context=context,
persist_config=persist_config)
persist_config=persist_config,
temp_file_path=temp_file_path)

if client_configuration is None:
config = type.__call__(Configuration)
Expand Down