Merge pull request #51081 from diegs/typo

Automatic merge from submit-queue (batch tested with PRs 51081, 52725). 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>..

daemon_controller: fix typo.

**What this PR does / why we need it**:

I found a small typo while implementing #48841.

With the existing code, some edge cases might lead to the wrong pods
being deleted.

**Release note**:
```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-09-19 13:34:55 -07:00 committed by GitHub
commit 7ca9ec7932

View File

@ -855,7 +855,7 @@ func (dsc *DaemonSetsController) manage(ds *extensions.DaemonSet, hash string) e
if len(daemonPodsRunning) > 1 {
sort.Sort(podByCreationTimestamp(daemonPodsRunning))
for i := 1; i < len(daemonPodsRunning); i++ {
podsToDelete = append(podsToDelete, daemonPods[i].Name)
podsToDelete = append(podsToDelete, daemonPodsRunning[i].Name)
}
}
case !shouldContinueRunning && exists: