Skip to content

Commit

Permalink
Allow autodown for k8s
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaelvll committed May 8, 2024
1 parent 12c156a commit 52e8aba
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 52e8aba

Please sign in to comment.