kubelet: Introduce PodInfraContainerChanged().
This functions computes in ahead whether we need to restart the pod infra container.
This commit is contained in:
@@ -222,9 +222,11 @@ func (f *FakeDockerClient) StopContainer(id string, timeout uint) error {
|
||||
f.Stopped = append(f.Stopped, id)
|
||||
var newList []docker.APIContainers
|
||||
for _, container := range f.ContainerList {
|
||||
if container.ID != id {
|
||||
newList = append(newList, container)
|
||||
if container.ID == id {
|
||||
f.ExitedContainerList = append(f.ExitedContainerList, container)
|
||||
continue
|
||||
}
|
||||
newList = append(newList, container)
|
||||
}
|
||||
f.ContainerList = newList
|
||||
}
|
||||
|
Reference in New Issue
Block a user