Exemplo n.º 1
0
def create_kube_api_client(kubeconfig_path: Optional[str] = None) -> ApiClient:
    kubeconfig_path = kubeconfig_path or "~/.kube/config"
    logger.info('creating kube client with config file: %s', kubeconfig_path)

    conf = Configuration()
    load_kube_config(config_file=kubeconfig_path, client_configuration=conf)
    return ApiClient(configuration=conf)
Exemplo n.º 2
0
def create_kube_api_client(kubeconfig_path: Optional[str] = None) -> ApiClient:
    if not kubeconfig_path:
        kubeconfig_path = env_variables['installer_kubeconfig_path']

    logger.info('creating kube client with config file: %s', kubeconfig_path)

    conf = Configuration()
    load_kube_config(config_file=kubeconfig_path, client_configuration=conf)
    return ApiClient(configuration=conf)
Exemplo n.º 3
0
 def __init__(self):
     Configuration.__init__(self)
     self.__verify_ssl = False