mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
kubelet: force filterContainerID to empty string when removeAll is true
This commit is contained in:
parent
d39eac929f
commit
2aba27da86
@ -99,6 +99,7 @@ func (p *podContainerDeletor) deleteContainersInPod(filterContainerID string, po
|
|||||||
containersToKeep := p.containersToKeep
|
containersToKeep := p.containersToKeep
|
||||||
if removeAll {
|
if removeAll {
|
||||||
containersToKeep = 0
|
containersToKeep = 0
|
||||||
|
filterContainerID = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, candidate := range getContainersToDeleteInPod(filterContainerID, podStatus, containersToKeep) {
|
for _, candidate := range getContainersToDeleteInPod(filterContainerID, podStatus, containersToKeep) {
|
||||||
|
Loading…
Reference in New Issue
Block a user