From 344459bbd119c8fd42a165746eb2f9170749a2c3 Mon Sep 17 00:00:00 2001 From: Zhanghao Wu Date: Wed, 8 May 2024 03:10:10 -0700 Subject: [PATCH] [k8s] Allow cancel autostop for cluster on k8s (#3525) * Allow autodown for k8s * k8s allow cancel --- sky/backends/cloud_vm_ray_backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sky/backends/cloud_vm_ray_backend.py b/sky/backends/cloud_vm_ray_backend.py index a550a4f0e36..4060d06d500 100644 --- a/sky/backends/cloud_vm_ray_backend.py +++ b/sky/backends/cloud_vm_ray_backend.py @@ -4066,7 +4066,7 @@ def set_autostop(self, if idle_minutes_to_autostop is not None: # Skip auto-stop for Kubernetes clusters. if (isinstance(handle.launched_resources.cloud, clouds.Kubernetes) - and not down): + and not down and idle_minutes_to_autostop >= 0): # We should hit this code path only for the jobs controller on # Kubernetes clusters. assert (controller_utils.Controllers.from_name(