Skip to content

Commit 9bf13a9

Browse files
authored
Support multiple port for container app (#24332)
* Support multiple port for container app * lint * comment
1 parent e8fc692 commit 9bf13a9

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
@@ -839,6 +839,16 @@
839839
"corsPolicy": {
840840
"description": "CORS policy for container app",
841841
"$ref": "#/definitions/CorsPolicy"
842+
},
843+
"additionalPortMappings": {
844+
"description": "Settings to expose additional ports on container app",
845+
"type": "array",
846+
"items": {
847+
"$ref": "#/definitions/IngressPortMapping"
848+
},
849+
"x-ms-identifiers": [
850+
"targetPort"
851+
]
842852
}
843853
}
844854
},
@@ -1044,6 +1054,30 @@
10441054
}
10451055
}
10461056
},
1057+
"IngressPortMapping": {
1058+
"description": "Port mappings of container app ingress",
1059+
"type": "object",
1060+
"required": [
1061+
"external",
1062+
"targetPort"
1063+
],
1064+
"properties": {
1065+
"external": {
1066+
"description": "Specifies whether the app port is accessible outside of the environment",
1067+
"type": "boolean"
1068+
},
1069+
"targetPort": {
1070+
"format": "int32",
1071+
"description": "Specifies the port user's container listens on",
1072+
"type": "integer"
1073+
},
1074+
"exposedPort": {
1075+
"format": "int32",
1076+
"description": "Specifies the exposed port for the target port. If not specified, it defaults to target port",
1077+
"type": "integer"
1078+
}
1079+
}
1080+
},
10471081
"CustomHostnameAnalysisResult": {
10481082
"description": "Custom domain analysis.",
10491083
"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)