Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CustomContainer property to 2021-06-01-preview api version to support bring your own container feature #14073

Merged
merged 8 commits into from
May 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2034,6 +2034,9 @@
"x-ms-examples": {
"Deployments_Get": {
"$ref": "./examples/Deployments_Get.json"
},
"Deployments_Get_CustomContainer": {
"$ref": "./examples/Deployments_Get_CustomContainer.json"
}
}
},
Expand Down Expand Up @@ -2105,6 +2108,9 @@
"x-ms-examples": {
"Deployments_CreateOrUpdate": {
"$ref": "./examples/Deployments_CreateOrUpdate.json"
},
"Deployments_CreateOrUpdate_CustomContainer": {
"$ref": "./examples/Deployments_CreateOrUpdate_CustomContainer.json"
}
}
},
Expand Down Expand Up @@ -2223,6 +2229,9 @@
"x-ms-examples": {
"Deployments_Update": {
"$ref": "./examples/Deployments_Update.json"
},
"Deployments_Update_CustomContainer": {
"$ref": "./examples/Deployments_Update_CustomContainer.json"
}
}
}
Expand Down Expand Up @@ -3897,7 +3906,8 @@
"enum": [
"Jar",
"NetCoreZip",
"Source"
"Source",
"Container"
],
"type": "string",
"x-ms-enum": {
Expand All @@ -3916,6 +3926,58 @@
"artifactSelector": {
"description": "Selector for the artifact to be used for the deployment for multi-module projects. This should be\r\nthe relative path to the target module/project.",
"type": "string"
},
"customContainer": {
"$ref": "#/definitions/CustomContainer",
"description": "Custom container payload"
}
}
},
"CustomContainer": {
"description": "Custom container payload",
"type": "object",
"properties": {
"server": {
"type": "string",
"description": "The name of the registry that contains the container image"
},
"containerImage": {
"type": "string",
"description": "Container image of the custom container. This should be in the form of <repository>:<tag> without the server name of the registry"
},
"command": {
"description": "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided.",
"uniqueItems": false,
"type": "array",
"items": {
"type": "string"
}
},
"args": {
"description": "Arguments to the entrypoint. The docker image's CMD is used if this is not provided.",
"uniqueItems": false,
"type": "array",
"items": {
"type": "string"
}
},
"imageRegistryCredential": {
"$ref": "#/definitions/ImageRegistryCredential",
"description": "Credential of the image registry"
}
}
},
"ImageRegistryCredential": {
"description": "Credential of the image registry",
"type": "object",
"properties": {
"username": {
"type": "string",
"description": "The username of the image registry credential"
},
"password": {
"type": "string",
"description": "The password of the image registry credential"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
{
"parameters": {
"deploymentResource": {
"properties": {
"source": {
"type": "Container",
"customContainer": {
"server": "myacr.azurecr.io",
"containerImage": "myContainerImage:v1",
"command": [
"/bin/sh"
],
"args": [
"-c",
"while true; do echo hello; sleep 10;done"
],
"imageRegistryCredential": {
"username": "myUsername",
"password": "myPassword"
}
}
},
"deploymentSettings": {
"resourceRequests": {
"cpu": "1000m",
"memory": "3Gi"
},
"environmentVariables": {
"env": "test"
}
},
"instances": null
}
},
"sku": {
"name": "S0",
"tier": "Standard",
"capacity": 1
},
"api-version": "2021-06-01-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "myResourceGroup",
"serviceName": "myservice",
"appName": "myapp",
"deploymentName": "mydeployment"
},
"responses": {
"201": {
"body": {
"properties": {
"source": {
"type": "Container",
"customContainer": {
"server": "myacr.azurecr.io",
"containerImage": "myContainerImage:v1",
"imageRegistryCredential": {
"username": "myUsername",
"password": ""
}
}
},
"appName": "myapp",
"deploymentSettings": {
"cpu": 1,
"memoryInGB": 3,
"resourceRequests": {
"cpu": "1000m",
"memory": "3Gi"
},
"environmentVariables": {
"env": "test"
}
},
"provisioningState": "Creating",
"status": "Running",
"active": false,
"instances": [
{
"name": "instance1",
"status": "Running",
"discoveryStatus": "N/A",
"startTime": "2020-08-26T01:55:02Z"
}
]
},
"sku": {
"name": "S0",
"tier": "Standard",
"capacity": 1
},
"type": "Microsoft.AppPlatform/Spring/apps/deployments",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment",
"name": "mydeployment"
}
},
"200": {
"body": {
"properties": {
"source": {
"type": "Container",
"customContainer": {
"server": "myacr.azurecr.io",
"containerImage": "myContainerImage:v1",
"imageRegistryCredential": {
"username": "myUsername",
"password": ""
}
}
},
"appName": "myapp",
"deploymentSettings": {
"cpu": 1,
"memoryInGB": 3,
"resourceRequests": {
"cpu": "1000m",
"memory": "3Gi"
},
"environmentVariables": {
"env": "test"
}
},
"provisioningState": "Succeeded",
"status": "Running",
"active": false,
"instances": [
{
"name": "instance1",
"status": "Running",
"discoveryStatus": "N/A",
"startTime": "2020-08-26T01:55:02Z"
}
]
},
"sku": {
"name": "S0",
"tier": "Standard",
"capacity": 1
},
"type": "Microsoft.AppPlatform/Spring/apps/deployments",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment",
"name": "mydeployment"
}
},
"202": {
"body": {
"properties": {
"source": {
"type": "Source",
"customContainer": {
"server": "myacr.azurecr.io",
"containerImage": "myContainerImage:v1",
"imageRegistryCredential": {
"username": "myUsername",
"password": ""
}
}
},
"appName": "myapp",
"deploymentSettings": {
"cpu": 1,
"memoryInGB": 3,
"resourceRequests": {
"cpu": "1000m",
"memory": "3Gi"
},
"environmentVariables": {
"env": "test"
}
},
"provisioningState": "Updating",
"status": "Running",
"active": false,
"instances": [
{
"name": "instance1",
"status": "Running",
"discoveryStatus": "N/A",
"startTime": "2020-08-26T01:55:02Z"
}
]
},
"sku": {
"name": "S0",
"tier": "Standard",
"capacity": 1
},
"type": "Microsoft.AppPlatform/Spring/apps/deployments",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment",
"name": "mydeployment"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"parameters": {
"api-version": "2021-06-01-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "myResourceGroup",
"serviceName": "myservice",
"appName": "myapp",
"deploymentName": "mydeployment"
},
"responses": {
"200": {
"body": {
"properties": {
"source": {
"type": "Container",
"customContainer": {
"server": "myacr.azurecr.io",
"containerImage": "myContainerImage:v1",
"command": [
"/bin/sh"
],
"args": [
"-c",
"while true; do echo hello; sleep 10;done"
],
"imageRegistryCredential": {
"username": "myUsername",
"password": ""
}
}
},
"appName": "myapp",
"deploymentSettings": {
"cpu": 1,
"memoryInGB": 3,
"resourceRequests": {
"cpu": "1000m",
"memory": "3Gi"
},
"environmentVariables": {
"env": "test"
}
},
"provisioningState": "Succeeded",
"status": "Running",
"active": false,
"instances": [
{
"name": "instance1",
"status": "Running",
"discoveryStatus": "N/A",
"startTime": "2020-08-26T01:55:02Z"
}
]
},
"sku": {
"name": "S0",
"tier": "Standard",
"capacity": 1
},
"type": "Microsoft.AppPlatform/Spring/apps/deployments",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment",
"name": "mydeployment"
}
}
}
}
Loading