mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00: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
@ -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 New Issue
Block a user