-
Notifications
You must be signed in to change notification settings - Fork 631
Open
Labels
enhancementNew feature or requestNew feature or request
Description
kuberay/ray-operator/controllers/ray/utils/util.go
Lines 345 to 352 in eb66a26
if *workerGroupSpec.MinReplicas > *workerGroupSpec.MaxReplicas { | |
log.Info("minReplicas is greater than maxReplicas, using maxReplicas as desired replicas. "+ | |
"Please fix this to avoid any unexpected behaviors.", "minReplicas", *workerGroupSpec.MinReplicas, "maxReplicas", *workerGroupSpec.MaxReplicas) | |
workerReplicas = *workerGroupSpec.MaxReplicas | |
} else if workerGroupSpec.Replicas == nil || *workerGroupSpec.Replicas < *workerGroupSpec.MinReplicas { | |
// Replicas is impossible to be nil as it has a default value assigned in the CRD. | |
// Add this check to make testing easier. | |
workerReplicas = *workerGroupSpec.MinReplicas |
Validation logic like this should be added to controllers/ray/utils/validation.go
and be checked before the rayCluster pods creation.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request