diff --git a/pkg/webhooks/jobset_webhook.go b/pkg/webhooks/jobset_webhook.go index f6639590..8c6fdfb2 100644 --- a/pkg/webhooks/jobset_webhook.go +++ b/pkg/webhooks/jobset_webhook.go @@ -384,7 +384,7 @@ func validateCoordinator(js *jobset.JobSet) error { // Returns nil if no replicatedJob with the given name exists. func replicatedJobByName(js *jobset.JobSet, replicatedJob string) *jobset.ReplicatedJob { for _, rjob := range js.Spec.ReplicatedJobs { - if rjob.Name == js.Spec.Coordinator.ReplicatedJob { + if rjob.Name == replicatdJob { return &rjob } }