[WIP][KubeRay][Autoscaler] Add KubeRay-side support for idle TTL termination#4815
Draft
400Ping wants to merge 1 commit into
Draft
[WIP][KubeRay][Autoscaler] Add KubeRay-side support for idle TTL termination#4815400Ping wants to merge 1 commit into
400Ping wants to merge 1 commit into
Conversation
Signed-off-by: 400Ping <jiekaichang@apache.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
Ray Autoscaler can already scale idle worker Pods down, but an idle RayCluster can still leave the head Pod, Services, and RayCluster custom resource running. For users whose head Pod consumes non-trivial reserved capacity, this leaves cost behind even after the Ray workload is idle.
This PR adds the KubeRay-side API and operator support for cluster-level idle termination via the Ray Autoscaler.
The intended flow is:
This keeps the component ownership split clean:
This PR does not implement Ray-level idle detection. A corresponding Ray Autoscaler change is required to read
ttlSecondsAfterIdle, decide when the cluster is idle past the TTL, and patch theIdleTTLExpiredstatus condition.Changes in this PR:
spec.autoscalerOptions.ttlSecondsAfterIdle.IdleTTLExpiredRayCluster condition type.rayclusters/status.IdleTTLExpired=Trueand idle TTL termination is still enabled in spec.ttlSecondsAfterIdleis non-negative and requiresenableInTreeAutoscaling=true.Related issue number
Related to #4768
Checks