Skip to content

Commit 5092713

Browse files
authored
Merge pull request kubernetes#130582 from tenzen-y/use-suspended-job-util
Job: Use jobSuspended util for suspended detection
2 parents 4f32f64 + 8202b79 commit 5092713

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/controller/job/job_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ func (jm *Controller) syncJob(ctx context.Context, key string) (rErr error) {
10071007
// Update the conditions / emit events only if manageJob was called in
10081008
// this syncJob. Otherwise wait for the right syncJob call to make
10091009
// updates.
1010-
if job.Spec.Suspend != nil && *job.Spec.Suspend {
1010+
if jobSuspended(&job) {
10111011
// Job can be in the suspended state only if it is NOT completed.
10121012
var isUpdated bool
10131013
job.Status.Conditions, isUpdated = ensureJobConditionStatus(job.Status.Conditions, batch.JobSuspended, v1.ConditionTrue, "JobSuspended", "Job suspended", jm.clock.Now())

0 commit comments

Comments
 (0)