mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 05:02:50 +00:00
Restart network container when container's configure is changed.
Fix #2099
This commit is contained in:
@@ -588,6 +588,14 @@ func (kl *Kubelet) syncPod(pod *api.BoundPod, dockerContainers dockertools.Docke
|
||||
continue
|
||||
}
|
||||
killedContainers[containerID] = empty{}
|
||||
|
||||
// Also kill associated network container
|
||||
if netContainer, found, _ := dockerContainers.FindPodContainer(podFullName, uuid, networkContainerName); found {
|
||||
if err := kl.killContainer(netContainer); err != nil {
|
||||
glog.V(1).Infof("Failed to kill network container %s: %v", netContainer.ID, err)
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check RestartPolicy for container
|
||||
|
Reference in New Issue
Block a user