From 4bdd7c6b8bf4044b0548c0d3a63b1c1c0d4580d3 Mon Sep 17 00:00:00 2001 From: Zhenquan Xu Date: Wed, 7 Jun 2023 11:29:42 +0800 Subject: [PATCH 1/3] Support multiple port for container app --- .../2023-05-02-preview/ContainerApps.json | 34 +++++++++++++++++++ .../ContainerApps_CreateOrUpdate.json | 13 ++++++- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/ContainerApps.json index cd7bfba4bc98..a7092a7f026c 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/ContainerApps.json @@ -839,6 +839,16 @@ "corsPolicy": { "description": "CORS policy for container app", "$ref": "#/definitions/CorsPolicy" + }, + "additionalPortMappings": { + "description": "Settings to expose additional ports on container app", + "type": "array", + "items":{ + "$ref": "#/definitions/IngressPortMapping" + }, + "x-ms-identifiers": [ + "targetPort" + ] } } }, @@ -1044,6 +1054,30 @@ } } }, + "IngressPortMapping":{ + "description": "Port mappings of container app ingress", + "type": "object", + "required": [ + "external", + "targetPort" + ], + "properties":{ + "external":{ + "description": "Specifies whether the app port is accessible outside of the managed environment", + "type": "boolean" + }, + "targetPort": { + "format": "int32", + "description": "Specifies the port user's container listens on", + "type": "integer" + }, + "exposedPort": { + "format": "int32", + "description": "Specifies the exposed port for the target port. If not specified, it defaults to target port", + "type": "integer" + } + } + }, "CustomHostnameAnalysisResult": { "description": "Custom domain analysis.", "type": "object", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/ContainerApps_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/ContainerApps_CreateOrUpdate.json index d4c7831e0cf4..1381b837770a 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/ContainerApps_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/ContainerApps_CreateOrUpdate.json @@ -69,7 +69,18 @@ ], "maxAge": 1234, "allowCredentials": true - } + }, + "additionalPortMappings": [ + { + "external": true, + "targetPort": 1234 + }, + { + "external": false, + "targetPort": 2345, + "exposedPort": 3456 + } + ] }, "dapr": { "enabled": true, From 137e2423d611de7d5c8c7a0bb0dfe193e9dc2852 Mon Sep 17 00:00:00 2001 From: Zhenquan Xu Date: Wed, 7 Jun 2023 11:41:41 +0800 Subject: [PATCH 2/3] lint --- .../preview/2023-05-02-preview/ContainerApps.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/ContainerApps.json index a7092a7f026c..56a2f9b9c34c 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/ContainerApps.json @@ -843,7 +843,7 @@ "additionalPortMappings": { "description": "Settings to expose additional ports on container app", "type": "array", - "items":{ + "items": { "$ref": "#/definitions/IngressPortMapping" }, "x-ms-identifiers": [ @@ -1054,15 +1054,15 @@ } } }, - "IngressPortMapping":{ + "IngressPortMapping": { "description": "Port mappings of container app ingress", "type": "object", "required": [ "external", "targetPort" ], - "properties":{ - "external":{ + "properties": { + "external": { "description": "Specifies whether the app port is accessible outside of the managed environment", "type": "boolean" }, @@ -1075,7 +1075,7 @@ "format": "int32", "description": "Specifies the exposed port for the target port. If not specified, it defaults to target port", "type": "integer" - } + } } }, "CustomHostnameAnalysisResult": { From 127f0347b26061abc250920e994fcfc837f53442 Mon Sep 17 00:00:00 2001 From: Zhenquan Xu Date: Wed, 7 Jun 2023 13:06:20 +0800 Subject: [PATCH 3/3] comment --- .../Microsoft.App/preview/2023-05-02-preview/ContainerApps.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/ContainerApps.json index 56a2f9b9c34c..042420a31187 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/ContainerApps.json @@ -1063,7 +1063,7 @@ ], "properties": { "external": { - "description": "Specifies whether the app port is accessible outside of the managed environment", + "description": "Specifies whether the app port is accessible outside of the environment", "type": "boolean" }, "targetPort": {