Fix Windows CNI for the sandbox case

Windows supports both sandbox and non-sandbox cases. The non-sandbox
case is for Windows Server 2016 and for Windows Server version greater
than 1709 which use Hyper-V containers.

Currently, the CNI on Windows fetches the IP from the containers
within the pods regardless of the mode. This should be done only
in the non-sandbox mode where the IP of the actual container
will be different than the IP of the sandbox container.

In the case where the sandbox container is supported, all the containers
from the same pod will share the network details of the sandbox container.

This patch updates the CNI to fetch the IP from the sandbox container
when this mode is supported.

Signed-off-by: Alin Balutoiu <abalutoiu@cloudbasesolutions.com>
This commit is contained in:
Alin-Gheorghe Balutoiu
2018-05-23 09:52:37 +02:00
parent 23d9a48e6a
commit 49e762ab3a
4 changed files with 28 additions and 43 deletions

View File

@@ -136,7 +136,7 @@ func (ds *dockerService) updateCreateConfig(
return nil
}
func (ds *dockerService) determinePodIPBySandboxID(uid string) string {
func (ds *dockerService) determinePodIPBySandboxID(uid string, sandbox *dockertypes.ContainerJSON) string {
return ""
}