mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-03-20 09:35:13 -04:00
Merge pull request #78974 from DaiHao/daemon_controller
fix a bug that pods not be deleted from unmatched nodes by daemon controller
This commit is contained in:
commit
1782653fe8
1 changed files with 3 additions and 0 deletions
|
|
@ -934,6 +934,9 @@ func (dsc *DaemonSetsController) podsShouldBeOnNode(
|
|||
case !shouldContinueRunning && exists:
|
||||
// If daemon pod isn't supposed to run on node, but it is, delete all daemon pods on node.
|
||||
for _, pod := range daemonPods {
|
||||
if pod.DeletionTimestamp != nil {
|
||||
continue
|
||||
}
|
||||
podsToDelete = append(podsToDelete, pod.Name)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue