We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 668f9e2 commit eb654d7Copy full SHA for eb654d7
ray-operator/controllers/ray/utils/util.go
@@ -389,6 +389,10 @@ func GetWorkerGroupDesiredReplicas(workerGroupSpec rayv1.WorkerGroupSpec) int32
389
if workerGroupSpec.Suspend != nil && *workerGroupSpec.Suspend {
390
return 0
391
}
392
+ //Required to ensure all workers are shutdown when replicas is set to 0 before deleting the raycluster
393
+ if workerGroupSpec.Replicas != nil && *workerGroupSpec.Replicas == 0 {
394
+ return 0
395
+ }
396
if workerGroupSpec.Replicas == nil || *workerGroupSpec.Replicas < *workerGroupSpec.MinReplicas {
397
// Replicas is impossible to be nil as it has a default value assigned in the CRD.
398
// Add this check to make testing easier.
0 commit comments