@@ -866,32 +866,36 @@ def load_kube_config_from_dict(config_dict, context=None,
866866def new_client_from_config (
867867 config_file = None ,
868868 context = None ,
869- persist_config = True ):
869+ persist_config = True ,
870+ client_configuration = None ):
870871 """
871872 Loads configuration the same as load_kube_config but returns an ApiClient
872873 to be used with any API object. This will allow the caller to concurrently
873874 talk with multiple clusters.
874875 """
875- client_config = type .__call__ (Configuration )
876+ if client_configuration is None :
877+ client_configuration = type .__call__ (Configuration )
876878 load_kube_config (config_file = config_file , context = context ,
877- client_configuration = client_config ,
879+ client_configuration = client_configuration ,
878880 persist_config = persist_config )
879- return ApiClient (configuration = client_config )
881+ return ApiClient (configuration = client_configuration )
880882
881883
882884def new_client_from_config_dict (
883885 config_dict = None ,
884886 context = None ,
885887 persist_config = True ,
886- temp_file_path = None ):
888+ temp_file_path = None ,
889+ client_configuration = None ):
887890 """
888891 Loads configuration the same as load_kube_config_from_dict but returns an ApiClient
889892 to be used with any API object. This will allow the caller to concurrently
890893 talk with multiple clusters.
891894 """
892- client_config = type .__call__ (Configuration )
895+ if client_configuration is None :
896+ client_configuration = type .__call__ (Configuration )
893897 load_kube_config_from_dict (config_dict = config_dict , context = context ,
894- client_configuration = client_config ,
898+ client_configuration = client_configuration ,
895899 persist_config = persist_config ,
896900 temp_file_path = temp_file_path )
897- return ApiClient (configuration = client_config )
901+ return ApiClient (configuration = client_configuration )
0 commit comments