Skip to content

Commit ab9a16a

Browse files
committed
Cluster.up on ray cluster object
1 parent dc540c1 commit ab9a16a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

Diff for: src/codeflare_sdk/cluster/cluster.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,16 @@ def up(self):
179179
with open(self.app_wrapper_yaml) as f:
180180
yamls = yaml.load_all(f, Loader=yaml.FullLoader)
181181
for resource in yamls:
182-
print(resource["kind"])
183-
# api_instance.create_namespaced_custom_object(
184-
# group="ray.io",
185-
# version="v1alpha1",
186-
# namespace=namespace,
187-
# plural="rayclusters",
188-
# body=aw,
189-
# )
182+
if resource["kind"] == "RayCluster":
183+
api_instance.create_namespaced_custom_object(
184+
group="ray.io",
185+
version="v1alpha1",
186+
namespace=namespace,
187+
plural="rayclusters",
188+
body=resource,
189+
)
190+
else:
191+
print(resource["kind"])
190192
except Exception as e: # pragma: no cover
191193
return _kube_api_error_handling(e)
192194

0 commit comments

Comments
 (0)