Merge pull request #125520 from mimowo/cleanup-success-policy-check
Remove redundant check in Job success policy code
This commit is contained in:
@@ -880,7 +880,7 @@ func (jm *Controller) syncJob(ctx context.Context, key string) (rErr error) {
|
||||
}
|
||||
jobCtx.podsWithDelayedDeletionPerIndex = getPodsWithDelayedDeletionPerIndex(logger, jobCtx)
|
||||
}
|
||||
if jobCtx.finishedCondition == nil && hasSuccessCriteriaMetCondition(jobCtx.job) == nil {
|
||||
if jobCtx.finishedCondition == nil {
|
||||
if msg, met := matchSuccessPolicy(logger, job.Spec.SuccessPolicy, *job.Spec.Completions, jobCtx.succeededIndexes); met {
|
||||
jobCtx.finishedCondition = newCondition(batch.JobSuccessCriteriaMet, v1.ConditionTrue, batch.JobReasonSuccessPolicy, msg, jm.clock.Now())
|
||||
}
|
||||
|
Reference in New Issue
Block a user