Skip to content

Commit 2e543ca

Browse files
Changes in docs for release: v0.8.0
1 parent abec0ef commit 2e543ca

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

docs/cluster/cluster.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,8 @@ <h1 class="title">Module <code>codeflare_sdk.cluster.cluster</code></h1>
487487

488488
def get_cluster(cluster_name: str, namespace: str = &#34;default&#34;):
489489
try:
490-
config.load_kube_config()
491-
api_instance = client.CustomObjectsApi()
490+
config_check()
491+
api_instance = client.CustomObjectsApi(api_config_handler())
492492
rcs = api_instance.list_namespaced_custom_object(
493493
group=&#34;ray.io&#34;,
494494
version=&#34;v1alpha1&#34;,
@@ -509,7 +509,7 @@ <h1 class="title">Module <code>codeflare_sdk.cluster.cluster</code></h1>
509509
# private methods
510510
def _get_ingress_domain():
511511
try:
512-
config.load_kube_config()
512+
config_check()
513513
api_client = client.CustomObjectsApi(api_config_handler())
514514
ingress = api_client.get_cluster_custom_object(
515515
&#34;config.openshift.io&#34;, &#34;v1&#34;, &#34;ingresses&#34;, &#34;cluster&#34;
@@ -604,7 +604,7 @@ <h1 class="title">Module <code>codeflare_sdk.cluster.cluster</code></h1>
604604

605605

606606
def _map_to_ray_cluster(rc) -&gt; Optional[RayCluster]:
607-
if &#34;state&#34; in rc[&#34;status&#34;]:
607+
if &#34;status&#34; in rc and &#34;state&#34; in rc[&#34;status&#34;]:
608608
status = RayClusterStatus(rc[&#34;status&#34;][&#34;state&#34;].lower())
609609
else:
610610
status = RayClusterStatus.UNKNOWN
@@ -694,8 +694,8 @@ <h2 class="section-title" id="header-functions">Functions</h2>
694694
</summary>
695695
<pre><code class="python">def get_cluster(cluster_name: str, namespace: str = &#34;default&#34;):
696696
try:
697-
config.load_kube_config()
698-
api_instance = client.CustomObjectsApi()
697+
config_check()
698+
api_instance = client.CustomObjectsApi(api_config_handler())
699699
rcs = api_instance.list_namespaced_custom_object(
700700
group=&#34;ray.io&#34;,
701701
version=&#34;v1alpha1&#34;,

docs/utils/generate_yaml.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ <h1 class="title">Module <code>codeflare_sdk.utils.generate_yaml</code></h1>
5454
import uuid
5555
from kubernetes import client, config
5656
from .kube_api_helpers import _kube_api_error_handling
57-
from ..cluster.auth import api_config_handler
57+
from ..cluster.auth import api_config_handler, config_check
5858

5959

6060
def read_template(template):
@@ -299,7 +299,7 @@ <h1 class="title">Module <code>codeflare_sdk.utils.generate_yaml</code></h1>
299299

300300
command = command.replace(&#34;deployment-name&#34;, cluster_name)
301301
try:
302-
config.load_kube_config()
302+
config_check()
303303
api_client = client.CustomObjectsApi(api_config_handler())
304304
ingress = api_client.get_cluster_custom_object(
305305
&#34;config.openshift.io&#34;, &#34;v1&#34;, &#34;ingresses&#34;, &#34;cluster&#34;
@@ -542,7 +542,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
542542

543543
command = command.replace(&#34;deployment-name&#34;, cluster_name)
544544
try:
545-
config.load_kube_config()
545+
config_check()
546546
api_client = client.CustomObjectsApi(api_config_handler())
547547
ingress = api_client.get_cluster_custom_object(
548548
&#34;config.openshift.io&#34;, &#34;v1&#34;, &#34;ingresses&#34;, &#34;cluster&#34;

0 commit comments

Comments
 (0)