mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 18:24:07 +00:00
daemon_controller: fix typo.
With the existing code, some edge cases might lead to the wrong pods being deleted.
This commit is contained in:
parent
bf00190037
commit
9baaeba435
@ -854,7 +854,7 @@ func (dsc *DaemonSetsController) manage(ds *extensions.DaemonSet, hash string) e
|
|||||||
if len(daemonPodsRunning) > 1 {
|
if len(daemonPodsRunning) > 1 {
|
||||||
sort.Sort(podByCreationTimestamp(daemonPodsRunning))
|
sort.Sort(podByCreationTimestamp(daemonPodsRunning))
|
||||||
for i := 1; i < len(daemonPodsRunning); i++ {
|
for i := 1; i < len(daemonPodsRunning); i++ {
|
||||||
podsToDelete = append(podsToDelete, daemonPods[i].Name)
|
podsToDelete = append(podsToDelete, daemonPodsRunning[i].Name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case !shouldContinueRunning && exists:
|
case !shouldContinueRunning && exists:
|
||||||
|
Loading…
Reference in New Issue
Block a user