mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
do not delete pods whose deletiontimestamp != nil
This commit is contained in:
parent
4f29960cb2
commit
6c0e35d7b2
@ -934,6 +934,9 @@ func (dsc *DaemonSetsController) podsShouldBeOnNode(
|
|||||||
case !shouldContinueRunning && exists:
|
case !shouldContinueRunning && exists:
|
||||||
// If daemon pod isn't supposed to run on node, but it is, delete all daemon pods on node.
|
// If daemon pod isn't supposed to run on node, but it is, delete all daemon pods on node.
|
||||||
for _, pod := range daemonPods {
|
for _, pod := range daemonPods {
|
||||||
|
if pod.DeletionTimestamp != nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
podsToDelete = append(podsToDelete, pod.Name)
|
podsToDelete = append(podsToDelete, pod.Name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user