Skip to content

Commit 368ee4b

Browse files
authored
Merge pull request kubernetes#79068 from tedyu/dc-skipped-pods
Remove unnecessary loop for lowering expectations
2 parents 5e9da75 + 9c5f311 commit 368ee4b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pkg/controller/daemon/daemon_controller.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,9 +1076,7 @@ func (dsc *DaemonSetsController) syncNodes(ds *apps.DaemonSet, podsToDelete, nod
10761076
skippedPods := createDiff - (batchSize + pos)
10771077
if errorCount < len(errCh) && skippedPods > 0 {
10781078
klog.V(2).Infof("Slow-start failure. Skipping creation of %d pods, decrementing expectations for set %q/%q", skippedPods, ds.Namespace, ds.Name)
1079-
for i := 0; i < skippedPods; i++ {
1080-
dsc.expectations.CreationObserved(dsKey)
1081-
}
1079+
dsc.expectations.LowerExpectations(dsKey, skippedPods, 0)
10821080
// The skipped pods will be retried later. The next controller resync will
10831081
// retry the slow start process.
10841082
break

0 commit comments

Comments
 (0)