Skip to content

Commit

Permalink
Flip Min and max replicas for apiserver workerNodeSpec (#1638)
Browse files Browse the repository at this point in the history
  • Loading branch information
tedhtchang authored Nov 13, 2023
1 parent 03969c9 commit 5c9db54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apiserver/pkg/model/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ func PopulateWorkerNodeSpec(specs []rayv1api.WorkerGroupSpec) []*api.WorkerGroup
for _, spec := range specs {
workerNodeSpec := &api.WorkerGroupSpec{
RayStartParams: spec.RayStartParams,
MaxReplicas: *spec.MinReplicas,
MinReplicas: *spec.MaxReplicas,
MaxReplicas: *spec.MaxReplicas,
MinReplicas: *spec.MinReplicas,
Replicas: *spec.Replicas,
GroupName: spec.GroupName,
Image: spec.Template.Annotations[util.RayClusterImageAnnotationKey],
Expand Down
6 changes: 4 additions & 2 deletions apiserver/pkg/model/converter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ var (
deploymentReplicas int32 = 1
headNodeReplicas int32 = 1
workerReplicas int32 = 5
workerMinReplicas int32 = 1
workerMaxReplicas int32 = 3
unhealthySecondThreshold int32 = 900
floatNumber float64 = 1
secondsValue int32 = 100
Expand Down Expand Up @@ -148,8 +150,8 @@ var configMapWithTolerations = v1.ConfigMap{
var workerSpecTest = rayv1api.WorkerGroupSpec{
GroupName: "",
Replicas: &workerReplicas,
MinReplicas: &workerReplicas,
MaxReplicas: &workerReplicas,
MinReplicas: &workerMinReplicas,
MaxReplicas: &workerMaxReplicas,
RayStartParams: map[string]string{
"node-ip-address": "$MY_POD_IP",
},
Expand Down

0 comments on commit 5c9db54

Please sign in to comment.