Skip to content

Commit

Permalink
[k8s] Allow autodown for k8s (#3524)
Browse files Browse the repository at this point in the history
Allow autodown for k8s
  • Loading branch information
Michaelvll authored May 8, 2024
1 parent 12c156a commit ed8683c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sky/backends/cloud_vm_ray_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -1994,10 +1994,9 @@ def provision_with_retries(

requested_features = self._requested_features.copy()
# Skip stop feature for Kubernetes jobs controller.
if isinstance(to_provision.cloud, clouds.Kubernetes
) and controller_utils.Controllers.from_name(
cluster_name
) == controller_utils.Controllers.JOBS_CONTROLLER:
if (isinstance(to_provision.cloud, clouds.Kubernetes) and
controller_utils.Controllers.from_name(cluster_name)
== controller_utils.Controllers.JOBS_CONTROLLER):
assert (clouds.CloudImplementationFeatures.STOP
in requested_features), requested_features
requested_features.remove(
Expand Down Expand Up @@ -4066,7 +4065,8 @@ def set_autostop(self,
# cloud and resources support requested autostop.
if idle_minutes_to_autostop is not None:
# Skip auto-stop for Kubernetes clusters.
if isinstance(handle.launched_resources.cloud, clouds.Kubernetes):
if (isinstance(handle.launched_resources.cloud, clouds.Kubernetes)
and not down):
# We should hit this code path only for the jobs controller on
# Kubernetes clusters.
assert (controller_utils.Controllers.from_name(
Expand Down

0 comments on commit ed8683c

Please sign in to comment.