From 2e543caff59c1cfe83db12d98eac8d6147a06183 Mon Sep 17 00:00:00 2001 From: codeflare-machine-account Date: Wed, 20 Sep 2023 13:29:59 +0000 Subject: [PATCH] Changes in docs for release: v0.8.0 --- docs/cluster/cluster.html | 12 ++++++------ docs/utils/generate_yaml.html | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/cluster/cluster.html b/docs/cluster/cluster.html index dbb6cec5e..21950889a 100644 --- a/docs/cluster/cluster.html +++ b/docs/cluster/cluster.html @@ -487,8 +487,8 @@

Module codeflare_sdk.cluster.cluster

def get_cluster(cluster_name: str, namespace: str = "default"): try: - config.load_kube_config() - api_instance = client.CustomObjectsApi() + config_check() + api_instance = client.CustomObjectsApi(api_config_handler()) rcs = api_instance.list_namespaced_custom_object( group="ray.io", version="v1alpha1", @@ -509,7 +509,7 @@

Module codeflare_sdk.cluster.cluster

# private methods def _get_ingress_domain(): try: - config.load_kube_config() + config_check() api_client = client.CustomObjectsApi(api_config_handler()) ingress = api_client.get_cluster_custom_object( "config.openshift.io", "v1", "ingresses", "cluster" @@ -604,7 +604,7 @@

Module codeflare_sdk.cluster.cluster

def _map_to_ray_cluster(rc) -> Optional[RayCluster]: - if "state" in rc["status"]: + if "status" in rc and "state" in rc["status"]: status = RayClusterStatus(rc["status"]["state"].lower()) else: status = RayClusterStatus.UNKNOWN @@ -694,8 +694,8 @@

Functions

def get_cluster(cluster_name: str, namespace: str = "default"):
     try:
-        config.load_kube_config()
-        api_instance = client.CustomObjectsApi()
+        config_check()
+        api_instance = client.CustomObjectsApi(api_config_handler())
         rcs = api_instance.list_namespaced_custom_object(
             group="ray.io",
             version="v1alpha1",
diff --git a/docs/utils/generate_yaml.html b/docs/utils/generate_yaml.html
index ea1e73026..6d94e4c71 100644
--- a/docs/utils/generate_yaml.html
+++ b/docs/utils/generate_yaml.html
@@ -54,7 +54,7 @@ 

Module codeflare_sdk.utils.generate_yaml

import uuid from kubernetes import client, config from .kube_api_helpers import _kube_api_error_handling -from ..cluster.auth import api_config_handler +from ..cluster.auth import api_config_handler, config_check def read_template(template): @@ -299,7 +299,7 @@

Module codeflare_sdk.utils.generate_yaml

command = command.replace("deployment-name", cluster_name) try: - config.load_kube_config() + config_check() api_client = client.CustomObjectsApi(api_config_handler()) ingress = api_client.get_cluster_custom_object( "config.openshift.io", "v1", "ingresses", "cluster" @@ -542,7 +542,7 @@

Functions

command = command.replace("deployment-name", cluster_name) try: - config.load_kube_config() + config_check() api_client = client.CustomObjectsApi(api_config_handler()) ingress = api_client.get_cluster_custom_object( "config.openshift.io", "v1", "ingresses", "cluster"