Merge pull request #64028 from soltysh/job_scaler

Automatic merge from submit-queue (batch tested with PRs 63770, 63776, 64001, 64028, 63984). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Tolarate negative values when calculating job scale progress

**What this PR does / why we need it**:
It might happen that the job controller will complete a job, but the status will still contain information about active pods which during scale down operation will be giving false (non 0) value in [this calculation](1b950d1e8e/pkg/kubectl/cmd/scalejob/scalejob.go (L147)). To prevent that situation we should tolerate non-zero values there. 

/assign @liggitt 

**Release note**:
```release-note
NONE
```
pull/8/head
Kubernetes Submit Queue 2018-05-19 02:11:36 -07:00 committed by GitHub
commit 25c36876a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ func jobHasDesiredParallelism(jobClient batchclient.JobsGetter, job *batch.Job)
// otherwise count successful
progress := *job.Spec.Completions - job.Status.Active - job.Status.Succeeded
return progress == 0, nil
return progress <= 0, nil
}
}