@@ -860,32 +860,36 @@ def load_kube_config_from_dict(config_dict, context=None,
860
860
def new_client_from_config (
861
861
config_file = None ,
862
862
context = None ,
863
- persist_config = True ):
863
+ persist_config = True ,
864
+ client_configuration = None ):
864
865
"""
865
866
Loads configuration the same as load_kube_config but returns an ApiClient
866
867
to be used with any API object. This will allow the caller to concurrently
867
868
talk with multiple clusters.
868
869
"""
869
- client_config = type .__call__ (Configuration )
870
+ if client_configuration is None :
871
+ client_configuration = type .__call__ (Configuration )
870
872
load_kube_config (config_file = config_file , context = context ,
871
- client_configuration = client_config ,
873
+ client_configuration = client_configuration ,
872
874
persist_config = persist_config )
873
- return ApiClient (configuration = client_config )
875
+ return ApiClient (configuration = client_configuration )
874
876
875
877
876
878
def new_client_from_config_dict (
877
879
config_dict = None ,
878
880
context = None ,
879
881
persist_config = True ,
880
- temp_file_path = None ):
882
+ temp_file_path = None ,
883
+ client_configuration = None ):
881
884
"""
882
885
Loads configuration the same as load_kube_config_from_dict but returns an ApiClient
883
886
to be used with any API object. This will allow the caller to concurrently
884
887
talk with multiple clusters.
885
888
"""
886
- client_config = type .__call__ (Configuration )
889
+ if client_configuration is None :
890
+ client_configuration = type .__call__ (Configuration )
887
891
load_kube_config_from_dict (config_dict = config_dict , context = context ,
888
- client_configuration = client_config ,
892
+ client_configuration = client_configuration ,
889
893
persist_config = persist_config ,
890
894
temp_file_path = temp_file_path )
891
- return ApiClient (configuration = client_config )
895
+ return ApiClient (configuration = client_configuration )
0 commit comments