Skip to content

Commit

Permalink
Removed v1alpha1 references
Browse files Browse the repository at this point in the history
  • Loading branch information
Tansito committed Feb 13, 2024
1 parent cf75fe4 commit c0eebe5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gateway/api/ray.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def create_ray_cluster(
k8s_client = kubernetes_client.api_client.ApiClient()
dyn_client = DynamicClient(k8s_client)
raycluster_client = dyn_client.resources.get(
api_version="v1alpha1", kind="RayCluster"
api_version="v1", kind="RayCluster"
)
response = raycluster_client.create(body=cluster_data, namespace=namespace)
if response.metadata.name != cluster_name:
Expand Down Expand Up @@ -288,7 +288,7 @@ def kill_ray_cluster(cluster_name: str) -> bool:
k8s_client = kubernetes_client.api_client.ApiClient()
dyn_client = DynamicClient(k8s_client)
raycluster_client = dyn_client.resources.get(
api_version="v1alpha1", kind="RayCluster"
api_version="v1", kind="RayCluster"
)
try:
delete_response = raycluster_client.delete(
Expand Down
4 changes: 2 additions & 2 deletions gateway/tests/api/test_ray.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_create_cluster(self):
self.assertEqual(user.username, compute_resource.title)
self.assertEqual(compute_resource.host, head_node_url)
DynamicClient.resources.get.assert_called_once_with(
api_version="v1alpha1", kind="RayCluster"
api_version="v1", kind="RayCluster"
)

def test_kill_cluster(self):
Expand All @@ -79,7 +79,7 @@ def test_kill_cluster(self):
success = kill_ray_cluster("some_cluster")
self.assertTrue(success)
DynamicClient.resources.get.assert_any_call(
api_version="v1alpha1", kind="RayCluster"
api_version="v1", kind="RayCluster"
)
DynamicClient.resources.get.assert_any_call(
api_version="v1", kind="Certificate"
Expand Down

0 comments on commit c0eebe5

Please sign in to comment.