Skip to content

Commit

Permalink
fix workergroupSpec invalid info
Browse files Browse the repository at this point in the history
  • Loading branch information
CheyuWu committed Jan 16, 2025
1 parent ed58672 commit 41a0ac7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ray-operator/apis/ray/v1/raycluster_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ func (r *RayCluster) ValidateRayClusterSpec() *field.Error {
)
}

for _, workerGroup := range r.Spec.WorkerGroupSpecs {
for i, workerGroup := range r.Spec.WorkerGroupSpecs {
if len(workerGroup.Template.Spec.Containers) == 0 {
return field.Invalid(
field.NewPath("spec").Child("workerGroupSpecs"),
r.Spec.WorkerGroupSpecs,
field.NewPath("spec").Child("workerGroupSpecs").Index(i),
workerGroup,
"workerGroupSpec should have at least one container",
)
}
Expand Down

0 comments on commit 41a0ac7

Please sign in to comment.