From ffc3493b987a3a2b3e4c7d93731d45bc3fea97e0 Mon Sep 17 00:00:00 2001 From: Tony Xu Date: Fri, 2 Nov 2018 07:32:09 -0700 Subject: [PATCH] Update swagger with DNSConfig and GPU (#4373) --- .../stable/2018-10-01/containerInstance.json | 64 +++++++++++++++++++ .../ContainerGroupsCreateOrUpdate.json | 31 ++++++++- 2 files changed, 92 insertions(+), 3 deletions(-) diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-10-01/containerInstance.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-10-01/containerInstance.json index c160d9793841..4c680ff8b8a7 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-10-01/containerInstance.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-10-01/containerInstance.json @@ -712,6 +712,10 @@ "description": "The CPU request of this container instance.", "type": "number", "format": "double" + }, + "gpu": { + "description": "The GPU request of this container instance.", + "$ref": "#/definitions/GpuResource" } } }, @@ -728,6 +732,38 @@ "description": "The CPU limit of this container instance.", "type": "number", "format": "double" + }, + "gpu": { + "description": "The GPU limit of this container instance.", + "$ref": "#/definitions/GpuResource" + } + } + }, + "GpuResource": { + "description": "The GPU resource.", + "type": "object", + "required": [ + "count", + "sku" + ], + "properties": { + "count": { + "description": "The count of the GPU resource.", + "type": "integer", + "format": "int32" + }, + "sku": { + "type": "string", + "description": "The SKU of the GPU resource.", + "enum": [ + "K80", + "P100", + "V100" + ], + "x-ms-enum": { + "name": "GpuSku", + "modelAsString": true + } } } }, @@ -1020,6 +1056,10 @@ "networkProfile": { "description": "The network profile information for a container group.", "$ref": "#/definitions/ContainerGroupNetworkProfile" + }, + "dnsConfig": { + "description": "The DNS config information for a container group.", + "$ref": "#/definitions/DnsConfiguration" } }, "required": [ @@ -1457,6 +1497,30 @@ } } }, + "DnsConfiguration": { + "description": "DNS configuration for the container group.", + "type": "object", + "required": [ + "nameServers" + ], + "properties": { + "nameServers": { + "description": "The DNS servers for the container group.", + "type": "array", + "items": { + "type": "string" + } + }, + "searchDomains": { + "description": "The DNS search domains for hostname lookup in the container group.", + "type": "string" + }, + "options": { + "description": "The DNS options for the container group.", + "type": "string" + } + } + }, "Resource": { "type": "object", "description": "The Resource model definition.", diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-10-01/examples/ContainerGroupsCreateOrUpdate.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-10-01/examples/ContainerGroupsCreateOrUpdate.json index 312d72858129..8218af17be94 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-10-01/examples/ContainerGroupsCreateOrUpdate.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-10-01/examples/ContainerGroupsCreateOrUpdate.json @@ -30,7 +30,11 @@ "resources": { "requests": { "cpu": 1, - "memoryInGB": 1.5 + "memoryInGB": 1.5, + "gpu": { + "count": 1, + "sku": "K80" + } } }, "volumeMounts": [ @@ -66,6 +70,11 @@ "networkProfile": { "id": "test-network-profile-id" }, + "dnsConfig": { + "nameServers": [ "1.1.1.1" ], + "searchDomains": "cluster.local svc.cluster.local", + "options": "ndots:2" + }, "imageRegistryCredentials": [], "ipAddress": { "ports": [ @@ -126,7 +135,11 @@ "resources": { "requests": { "cpu": 1, - "memoryInGB": 1.5 + "memoryInGB": 1.5, + "gpu": { + "count": 1, + "sku": "K80" + } } }, "volumeMounts": [ @@ -155,6 +168,11 @@ "workspaceKey": "" } }, + "dnsConfig": { + "nameServers": [ "1.1.1.1" ], + "searchDomains": "cluster.local svc.cluster.local", + "options": "ndots:2" + }, "imageRegistryCredentials": [], "ipAddress": { "ip": "10.0.0.1", @@ -212,7 +230,11 @@ "resources": { "requests": { "cpu": 1, - "memoryInGB": 1.5 + "memoryInGB": 1.5, + "gpu": { + "count": 1, + "sku": "K80" + } } }, "volumeMounts": [ @@ -235,6 +257,9 @@ } } ], + "dnsConfig": { + "nameServers": [ "1.1.1.1" ] + }, "imageRegistryCredentials": [], "ipAddress": { "ip": "10.0.0.1",