diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/CommonDefinitions.json b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/CommonDefinitions.json index e00edeb66435..4f22a8b8cf95 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/CommonDefinitions.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/CommonDefinitions.json @@ -34,8 +34,8 @@ } } }, - "Container": { - "description": "Container App container definition.", + "BaseContainer": { + "description": "Container App base container definition.", "type": "object", "properties": { "image": { @@ -74,24 +74,44 @@ "$ref": "#/definitions/ContainerResources", "description": "Container resource requirements." }, - "probes": { - "description": "List of probes for the container.", + "volumeMounts": { + "description": "Container volume mounts.", "type": "array", "items": { - "$ref": "#/definitions/ContainerAppProbe" + "$ref": "#/definitions/VolumeMount" }, "x-ms-identifiers": [ - "type" + "volumeName" ] - }, - "volumeMounts": { - "description": "Container volume mounts.", + } + } + }, + "InitContainer": { + "description": "Container App init container definition", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/BaseContainer" + } + ] + }, + "Container": { + "description": "Container App container definition", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/BaseContainer" + } + ], + "properties": { + "probes": { + "description": "List of probes for the container.", "type": "array", "items": { - "$ref": "#/definitions/VolumeMount" + "$ref": "#/definitions/ContainerAppProbe" }, "x-ms-identifiers": [ - "volumeName" + "type" ] } } @@ -468,6 +488,16 @@ "description": "User friendly suffix that is appended to the revision name", "type": "string" }, + "initContainers": { + "description": "List of specialized containers that run before app containers.", + "type": "array", + "items": { + "$ref": "#/definitions/InitContainer" + }, + "x-ms-identifiers": [ + "name" + ] + }, "containers": { "description": "List of container definitions for the Container App.", "type": "array", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CreateOrUpdate.json index 538658bd88b5..24c0e5f580bd 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CreateOrUpdate.json @@ -63,6 +63,23 @@ ] } ], + "initContainers": [ + { + "image": "repo/testcontainerApp0:v4", + "name": "testinitcontainerApp0", + "resources": { + "cpu": 0.2, + "memory": "100Mi" + }, + "command": [ + "/bin/sh" + ], + "args": [ + "-c", + "while true; do echo hello; sleep 10;done" + ] + } + ], "scale": { "minReplicas": 1, "maxReplicas": 5, @@ -159,6 +176,23 @@ ] } ], + "initContainers": [ + { + "image": "repo/testcontainerApp0:v4", + "name": "testinitcontainerApp0", + "resources": { + "cpu": 0.2, + "memory": "100Mi" + }, + "command": [ + "/bin/sh" + ], + "args": [ + "-c", + "while true; do echo hello; sleep 10;done" + ] + } + ], "scale": { "minReplicas": 1, "maxReplicas": 5, @@ -241,6 +275,23 @@ ] } ], + "initContainers": [ + { + "image": "repo/testcontainerApp0:v4", + "name": "testinitcontainerApp0", + "resources": { + "cpu": 0.2, + "memory": "100Mi" + }, + "command": [ + "/bin/sh" + ], + "args": [ + "-c", + "while true; do echo hello; sleep 10;done" + ] + } + ], "scale": { "minReplicas": 1, "maxReplicas": 5, diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json index d48160502b2f..82fda18754ed 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json @@ -65,6 +65,16 @@ } } ], + "initContainers": [ + { + "image": "repo/testcontainerApp0:v4", + "name": "testinitcontainerApp0", + "resources": { + "cpu": 0.2, + "memory": "100Mi" + } + } + ], "scale": { "minReplicas": 1, "maxReplicas": 5, diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListByResourceGroup.json b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListByResourceGroup.json index 93204d1cf0f0..c6764d48d46f 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListByResourceGroup.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListByResourceGroup.json @@ -66,6 +66,16 @@ } } ], + "initContainers": [ + { + "image": "repo/testcontainerApp0:v4", + "name": "testinitcontainerApp0", + "resources": { + "cpu": 0.2, + "memory": "100Mi" + } + } + ], "scale": { "minReplicas": 1, "maxReplicas": 5, diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListBySubscription.json b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListBySubscription.json index 7a5d0252899b..ce61a6600e5c 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListBySubscription.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListBySubscription.json @@ -65,6 +65,16 @@ } } ], + "initContainers": [ + { + "image": "repo/testcontainerApp0:v4", + "name": "testinitcontainerApp0", + "resources": { + "cpu": 0.2, + "memory": "100Mi" + } + } + ], "scale": { "minReplicas": 1, "maxReplicas": 5, diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Patch.json b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Patch.json index b7e19ec6d042..1d789a686ec2 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Patch.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Patch.json @@ -66,6 +66,16 @@ ] } ], + "initContainers": [ + { + "image": "repo/testcontainerApp0:v4", + "name": "testinitcontainerApp0", + "resources": { + "cpu": 0.2, + "memory": "100Mi" + } + } + ], "scale": { "minReplicas": 1, "maxReplicas": 5,