Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/cluster/cluster.html
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,8 @@ <h1 class="title">Module <code>codeflare_sdk.cluster.cluster</code></h1>

def get_cluster(cluster_name: str, namespace: str = &#34;default&#34;):
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=&#34;ray.io&#34;,
version=&#34;v1alpha1&#34;,
Expand All @@ -509,7 +509,7 @@ <h1 class="title">Module <code>codeflare_sdk.cluster.cluster</code></h1>
# 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(
&#34;config.openshift.io&#34;, &#34;v1&#34;, &#34;ingresses&#34;, &#34;cluster&#34;
Expand Down Expand Up @@ -604,7 +604,7 @@ <h1 class="title">Module <code>codeflare_sdk.cluster.cluster</code></h1>


def _map_to_ray_cluster(rc) -&gt; Optional[RayCluster]:
if &#34;state&#34; in rc[&#34;status&#34;]:
if &#34;status&#34; in rc and &#34;state&#34; in rc[&#34;status&#34;]:
status = RayClusterStatus(rc[&#34;status&#34;][&#34;state&#34;].lower())
else:
status = RayClusterStatus.UNKNOWN
Expand Down Expand Up @@ -694,8 +694,8 @@ <h2 class="section-title" id="header-functions">Functions</h2>
</summary>
<pre><code class="python">def get_cluster(cluster_name: str, namespace: str = &#34;default&#34;):
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=&#34;ray.io&#34;,
version=&#34;v1alpha1&#34;,
Expand Down
6 changes: 3 additions & 3 deletions docs/utils/generate_yaml.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ <h1 class="title">Module <code>codeflare_sdk.utils.generate_yaml</code></h1>
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):
Expand Down Expand Up @@ -299,7 +299,7 @@ <h1 class="title">Module <code>codeflare_sdk.utils.generate_yaml</code></h1>

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

command = command.replace(&#34;deployment-name&#34;, cluster_name)
try:
config.load_kube_config()
config_check()
api_client = client.CustomObjectsApi(api_config_handler())
ingress = api_client.get_cluster_custom_object(
&#34;config.openshift.io&#34;, &#34;v1&#34;, &#34;ingresses&#34;, &#34;cluster&#34;
Expand Down