Added windows hostProcess cni skip

Signed-off-by: Peri Thompson <perit@vmware.com>
This commit is contained in:
Peri Thompson
2021-08-11 22:23:49 +01:00
parent 7d4c95ff04
commit 79b369a0bb
8 changed files with 36 additions and 1 deletions

View File

@@ -76,6 +76,9 @@ func (c *criService) getIPs(sandbox sandboxstore.Sandbox) (string, []string, err
// responsible for reporting the IP.
return "", nil, nil
}
if goruntime.GOOS == "windows" && config.GetWindows().GetSecurityContext().GetHostProcess() {
return "", nil, nil
}
if closed, err := sandbox.NetNS.Closed(); err != nil {
return "", nil, errors.Wrap(err, "check network namespace closed")