Skip to content

Commit

Permalink
added Kind condition
Browse files Browse the repository at this point in the history
  • Loading branch information
vicentefb committed Mar 15, 2024
1 parent 25584c9 commit f0f98d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/jobframework/reconciler.go
Expand Up @@ -353,7 +353,7 @@ func (r *JobReconciler) ReconcileGenericJob(ctx context.Context, req ctrl.Reques
podSets := job.PodSets()
jobPodSetCount := podSets[1].Count
workloadPodSetCount := wl.Spec.PodSets[1].Count
if workloadPodSetCount != jobPodSetCount {
if workloadPodSetCount > jobPodSetCount {
toUpdate := wl
_, err := r.updateWorkloadToMatchJob(ctx, job, object, toUpdate, "Updated Workload due to resize: %v")
if err != nil {
Expand Down Expand Up @@ -694,7 +694,7 @@ func equivalentToWorkload(ctx context.Context, c client.Client, job GenericJob,
jobPodSets := clearMinCountsIfFeatureDisabled(job.PodSets())

if runningPodSets := expectedRunningPodSets(ctx, c, wl); runningPodSets != nil {
if equality.ComparePodSetSlices(jobPodSets, runningPodSets) || features.Enabled(features.DynamicallySizedJobs) {
if equality.ComparePodSetSlices(jobPodSets, runningPodSets) || (features.Enabled(features.DynamicallySizedJobs) && job.GVK().Kind == "RayCluster") {
return true
}
// If the workload is admitted but the job is suspended, do the check
Expand Down

0 comments on commit f0f98d9

Please sign in to comment.