From 6f5fcd44f6978a021f1d4828d3e088d79221b241 Mon Sep 17 00:00:00 2001 From: Dinesh Kumar Govindasamy Date: Fri, 31 Aug 2018 10:33:48 -0700 Subject: [PATCH] Support for network namespace in windows This is to add network namespace support for Windows Signed-off-by: Dinesh Govindasamy Co-Authored-By: msabansal --- config-windows.md | 4 +++- schema/config-windows.json | 3 +++ specs-go/config.go | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/config-windows.md b/config-windows.md index 5e9ea3b1c..52798772b 100644 --- a/config-windows.md +++ b/config-windows.md @@ -125,6 +125,7 @@ The following parameters can be specified: * **`allowUnqualifiedDNSQuery`** *(bool, OPTIONAL)* - specifies if unqualified DNS name resolution is allowed. * **`DNSSearchList`** *(array of strings, OPTIONAL)* - comma separated list of DNS suffixes to use for name resolution. * **`networkSharedContainerName`** *(string, OPTIONAL)* - name (ID) of the container that we will share with the network stack. +* **`networkNamespace`** *(string, OPTIONAL)* - name (ID) of the network namespace that will be used for the container. If a network namespace is specified no other parameter must be specified. ### Example @@ -139,7 +140,8 @@ The following parameters can be specified: "a.com", "b.com" ], - "networkSharedContainerName": "containerName" + "networkSharedContainerName": "containerName", + "networkNamespace": "168f3daf-efc6-4377-b20a-2c86764ba892" } } ``` diff --git a/schema/config-windows.json b/schema/config-windows.json index 264cf2746..68b51e902 100644 --- a/schema/config-windows.json +++ b/schema/config-windows.json @@ -71,6 +71,9 @@ }, "networkSharedContainerName": { "type": "string" + }, + "networkNamespace": { + "type": "string" } } }, diff --git a/specs-go/config.go b/specs-go/config.go index 7781c5361..f32698cab 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -503,6 +503,8 @@ type WindowsNetwork struct { DNSSearchList []string `json:"DNSSearchList,omitempty"` // Name (ID) of the container that we will share with the network stack. NetworkSharedContainerName string `json:"networkSharedContainerName,omitempty"` + // name (ID) of the network namespace that will be used for the container. + NetworkNamespace string `json:"networkNamespace,omitempty"` } // WindowsHyperV contains information for configuring a container to run with Hyper-V isolation.