Skip to content

Commit

Permalink
Job: Drop an incorrect comment in the job-controller
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
  • Loading branch information
tenzen-y committed Mar 7, 2024
1 parent 20cb3c1 commit 9fd9faf
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions pkg/controller/job/job_controller.go
Expand Up @@ -1098,8 +1098,6 @@ func (jm *Controller) trackJobStatusAndRemoveFinalizers(ctx context.Context, job
uncountedStatus.Succeeded = append(uncountedStatus.Succeeded, pod.UID)
}
} else if considerPodFailed || (jobCtx.finishedCondition != nil && !isSuccessCriteriaMetCondition(jobCtx.finishedCondition)) {
// If the number of succeeded pods have reached completions, the Job is declared completed,
// and any still running Pod should be deleted and considered Failed.
// When the job is considered finished, every non-terminated pod is considered failed.
ix := getCompletionIndex(pod.Annotations)
if !jobCtx.uncounted.failed.Has(string(pod.UID)) && (!isIndexed || (ix != unknownCompletionIndex && ix < int(*jobCtx.job.Spec.Completions))) {
Expand Down

0 comments on commit 9fd9faf

Please sign in to comment.