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:
Kubernetes Prow Robot
2019-06-15 03:46:11 -07:00
committed by GitHub

View File

@@ -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)
}
}