Example #1
0
def kube_api_logs(args):
    client = ClientFactory.create_kube_api_client(args.kubeconfig_path)
    for item in ClusterDeployment.list_all_namespaces(
            CustomObjectsApi(client)).get("items", []):
        if item["spec"]["clusterName"]:
            download_logs_kube_api(
                client,
                item["spec"]["clusterName"],
                item["metadata"]["namespace"],
                args.dest,
                args.must_gather,
                args.kubeconfig_path,
            )
Example #2
0
 def kube_api_client(self):
     yield ClientFactory.create_kube_api_client()
Example #3
0
def create_kube_api_client(kubeconfig_path: Optional[str] = None) -> ApiClient:
    warnings.warn(
        "create_kube_api_client is deprecated. Use ClientFactory.create_kube_api_client instead.",
        DeprecationWarning)
    return ClientFactory.create_kube_api_client(kubeconfig_path)