do not delete pods whose deletiontimestamp != nil

This commit is contained in:
daihao 2019-06-13 17:47:52 +08:00
parent 4f29960cb2
commit 6c0e35d7b2

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