Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[k8s] Autodown Serve controller on Kubernetes #3984

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions sky/backends/cloud_vm_ray_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -4147,11 +4147,21 @@ def set_autostop(self,
idle_minutes_to_autostop >= 0):
# We should hit this code path only for the controllers on
# Kubernetes and RunPod clusters.
assert (controller_utils.Controllers.from_name(
handle.cluster_name) is not None), handle.cluster_name
logger.info('Auto-stop is not supported for Kubernetes '
'and RunPod clusters. Skipping.')
return
controller = controller_utils.Controllers.from_name(
handle.cluster_name)
assert (controller is not None), handle.cluster_name
if (controller
== controller_utils.Controllers.SKY_SERVE_CONTROLLER and
isinstance(handle.launched_resources.cloud,
clouds.Kubernetes)):
# For SkyServe controllers on Kubernetes: override autostop
# behavior to force autodown (instead of no-op)
# to avoid dangling controllers.
down = True
else:
logger.info('Auto-stop is not supported for Kubernetes '
'and RunPod clusters. Skipping.')
return

# Check if we're stopping spot
assert (handle.launched_resources is not None and
Expand Down
Loading