Skip to content

Commit 6bb1e35

Browse files
authored
Support multiple port for container app (#24332) (#24459)
* Support multiple port for container app * lint * comment
1 parent 721daae commit 6bb1e35

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/ContainerApps.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,16 @@
961961
"corsPolicy": {
962962
"description": "CORS policy for container app",
963963
"$ref": "#/definitions/CorsPolicy"
964+
},
965+
"additionalPortMappings": {
966+
"description": "Settings to expose additional ports on container app",
967+
"type": "array",
968+
"items": {
969+
"$ref": "#/definitions/IngressPortMapping"
970+
},
971+
"x-ms-identifiers": [
972+
"targetPort"
973+
]
964974
}
965975
}
966976
},
@@ -1166,6 +1176,30 @@
11661176
}
11671177
}
11681178
},
1179+
"IngressPortMapping": {
1180+
"description": "Port mappings of container app ingress",
1181+
"type": "object",
1182+
"required": [
1183+
"external",
1184+
"targetPort"
1185+
],
1186+
"properties": {
1187+
"external": {
1188+
"description": "Specifies whether the app port is accessible outside of the environment",
1189+
"type": "boolean"
1190+
},
1191+
"targetPort": {
1192+
"format": "int32",
1193+
"description": "Specifies the port user's container listens on",
1194+
"type": "integer"
1195+
},
1196+
"exposedPort": {
1197+
"format": "int32",
1198+
"description": "Specifies the exposed port for the target port. If not specified, it defaults to target port",
1199+
"type": "integer"
1200+
}
1201+
}
1202+
},
11691203
"CustomHostnameAnalysisResult": {
11701204
"description": "Custom domain analysis.",
11711205
"type": "object",

specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/ContainerApps_CreateOrUpdate.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,18 @@
6969
],
7070
"maxAge": 1234,
7171
"allowCredentials": true
72-
}
72+
},
73+
"additionalPortMappings": [
74+
{
75+
"external": true,
76+
"targetPort": 1234
77+
},
78+
{
79+
"external": false,
80+
"targetPort": 2345,
81+
"exposedPort": 3456
82+
}
83+
]
7384
},
7485
"dapr": {
7586
"enabled": true,

0 commit comments

Comments
 (0)