30
30
import oauthlib .oauth2
31
31
import urllib3
32
32
import yaml
33
- from requests_oauthlib import OAuth2Session
34
- from six import PY3
35
-
36
33
from kubernetes .client import ApiClient , Configuration
37
34
from kubernetes .config .exec_provider import ExecProvider
35
+ from requests_oauthlib import OAuth2Session
36
+ from six import PY3
38
37
39
38
from .config_exception import ConfigException
40
39
from .dateutil import UTC , format_rfc3339 , parse_rfc3339
@@ -688,13 +687,15 @@ def save_config(self, path):
688
687
yaml .safe_dump (self .config_files [path ], f ,
689
688
default_flow_style = False )
690
689
690
+
691
691
def _get_kube_config_loader_for_yaml_file (
692
692
filename , persist_config = False , ** kwargs ):
693
693
return _get_kube_config_loader (
694
694
filename = filename ,
695
695
persist_config = persist_config ,
696
696
** kwargs )
697
697
698
+
698
699
def _get_kube_config_loader (
699
700
filename = None ,
700
701
config_dict = None ,
@@ -719,6 +720,7 @@ def _get_kube_config_loader(
719
720
config_base_path = None ,
720
721
** kwargs )
721
722
723
+
722
724
def list_kube_config_contexts (config_file = None ):
723
725
724
726
if config_file is None :
@@ -757,9 +759,10 @@ def load_kube_config(config_file=None, context=None,
757
759
else :
758
760
loader .load_and_set (client_configuration )
759
761
762
+
760
763
def load_kube_config_from_dict (config_dict , context = None ,
761
- client_configuration = None ,
762
- persist_config = True ):
764
+ client_configuration = None ,
765
+ persist_config = True ):
763
766
"""Loads authentication and cluster information from config_dict file
764
767
and stores them in kubernetes.client.configuration.
765
768
@@ -788,6 +791,7 @@ def load_kube_config_from_dict(config_dict, context=None,
788
791
else :
789
792
loader .load_and_set (client_configuration )
790
793
794
+
791
795
def new_client_from_config (
792
796
config_file = None ,
793
797
context = None ,
0 commit comments