mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-09 08:55:55 -04:00
Merge pull request #125520 from mimowo/cleanup-success-policy-check
Remove redundant check in Job success policy code
This commit is contained in:
commit
bd88faee8b
1 changed files with 1 additions and 1 deletions
|
|
@ -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())
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue