Merge pull request #79068 from tedyu/dc-skipped-pods

Remove unnecessary loop for lowering expectations
This commit is contained in:
Kubernetes Prow Robot 2019-07-26 14:01:59 -07:00 committed by GitHub
commit 368ee4bb8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1076,9 +1076,7 @@ func (dsc *DaemonSetsController) syncNodes(ds *apps.DaemonSet, podsToDelete, nod
skippedPods := createDiff - (batchSize + pos)
if errorCount < len(errCh) && skippedPods > 0 {
klog.V(2).Infof("Slow-start failure. Skipping creation of %d pods, decrementing expectations for set %q/%q", skippedPods, ds.Namespace, ds.Name)
for i := 0; i < skippedPods; i++ {
dsc.expectations.CreationObserved(dsKey)
}
dsc.expectations.LowerExpectations(dsKey, skippedPods, 0)
// The skipped pods will be retried later. The next controller resync will
// retry the slow start process.
break