
    ?g                     R    d dl mZmZ ddlmZ ddlmZ ddlmZm	Z	m
Z
mZmZmZ d Zy)    )exists
expanduser   )ConfigException)load_incluster_config)KUBE_CONFIG_DEFAULT_LOCATIONlist_kube_config_contextsload_kube_configload_kube_config_from_dictnew_client_from_confignew_client_from_config_dictc                  @   d| j                         v rt        di |  yd| j                         v r!| j                  dd      | d<   t        di |  yt        t	        t
                    rt        di |  yt        dj                  t
                     t        di |  y)a  
    Wrapper function to load the kube_config.
    It will initially try to load_kube_config from provided path,
    then check if the KUBE_CONFIG_DEFAULT_LOCATION exists
    If neither exists, it will fall back to load_incluster_config
    and inform the user accordingly.

    :param kwargs: A combination of all possible kwargs that
    can be passed to either load_kube_config or
    load_incluster_config functions.
    config_filekube_config_pathNzukube_config_path not provided and default location ({0}) does not exist. Using inCluster Config. This might not work. )	keysr
   popr   r   r   printformatr   )kwargss    O/var/www/openai/venv/lib/python3.12/site-packages/kubernetes/config/__init__.pyload_configr      s     %"6"	v{{}	, &

+=t D}"6"	
78	9"6"# $*6*F#G		I
 	''    N)os.pathr   r   config_exceptionr   incluster_configr   kube_configr   r	   r
   r   r   r   r   r   r   r   <module>r      s!    ' - 3k k
(r   