diff --git a/pkg/controller/jobframework/reconciler.go b/pkg/controller/jobframework/reconciler.go index 7abf63dd6e..f091ffc211 100644 --- a/pkg/controller/jobframework/reconciler.go +++ b/pkg/controller/jobframework/reconciler.go @@ -695,8 +695,7 @@ func equivalentToWorkload(ctx context.Context, c client.Client, job GenericJob, if runningPodSets := expectedRunningPodSets(ctx, c, wl); runningPodSets != nil { jobPodSetCount := job.PodSets() - workloadPodSetCount := wl.Spec.PodSets[1].Count - if equality.ComparePodSetSlices(jobPodSets, runningPodSets) || (features.Enabled(features.DynamicallySizedJobs) && job.GVK().Kind == "RayCluster" && jobPodSetCount[1].Count < workloadPodSetCount) { + if equality.ComparePodSetSlices(jobPodSets, runningPodSets) || (features.Enabled(features.DynamicallySizedJobs) && job.GVK().Kind == "RayCluster" && jobPodSetCount[1].Count < wl.Spec.PodSets[1].Count) { return true } // If the workload is admitted but the job is suspended, do the check