Skip to content

Commit

Permalink
Swagger Fixes for Container App, KubeEnvironments spec (#16793)
Browse files Browse the repository at this point in the history
* Pre-Prettier-commit

* Adding missing file

* Prettier fixes

* Add missing definitions

* Fix intendation in readme.md

* add suppressions

* Fix Kube Environments 2021-03-01 contract + add list secrets api to Container Apps Swagger

* Fix sercret read property

* Prettier fix

* Model fix

* Prettier Fix #2

Co-authored-by: Jenny Lawrance <jennylaw@microsoft.com>
  • Loading branch information
sanchitmehta and JennyLawrance authored Nov 24, 2021
1 parent c0a3d9e commit 066b3ac
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,49 @@
},
"x-ms-long-running-operation": true
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps/{name}/listSecrets": {
"post": {
"tags": [
"ContainerApps"
],
"summary": "List secrets for a container app",
"operationId": "ContainerApps_ListSecrets",
"parameters": [
{
"$ref": "#/parameters/subscriptionIdParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
},
{
"name": "name",
"in": "path",
"description": "Name of the Container App.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SecretsCollection"
}
},
"default": {
"description": "App Service error response.",
"schema": {
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
}
}
},
"x-ms-examples": {
"List Container Apps Secrets": {
"$ref": "./examples/ListContainerAppSecrets.json"
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -373,6 +416,22 @@
}
}
},
"SecretsCollection": {
"description": "Container App Secrets Collection ARM resource.",
"required": [
"value"
],
"type": "object",
"properties": {
"value": {
"description": "Collection of resources.",
"type": "array",
"items": {
"$ref": "#/definitions/ContainerAppSecret"
}
}
}
},
"Ingress": {
"description": "Container App Ingress configuration.",
"type": "object",
Expand Down Expand Up @@ -454,6 +513,22 @@
}
}
},
"ContainerAppSecret": {
"description": "Container App Secret.",
"type": "object",
"properties": {
"name": {
"description": "Secret Name.",
"type": "string",
"readOnly": true
},
"value": {
"description": "Secret Value.",
"type": "string",
"readOnly": true
}
}
},
"TrafficWeight": {
"description": "Traffic weight assigned to a revision",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,50 +339,41 @@
"read"
]
},
"vnetConfiguration": {
"$ref": "#/definitions/VnetConfiguration"
}
}
},
"VnetConfiguration": {
"type": "object",
"description": "Configuration properties for container apps environment to join a Virtual Network",
"properties": {
"platformServiceCidr": {
"platformReservedCidr": {
"type": "string",
"description": "CIDR notation IP range from which to assign infrastructure service environment IPs. It must not overlap with any Subnet IP ranges.",
"description": "IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. It must not overlap with any other Subnet IP ranges.",
"x-ms-mutability": [
"create",
"read"
]
},
"platformServiceDnsIp": {
"platformReservedDnsIP": {
"type": "string",
"description": "IpAddress in platformService Cidr for internal service DNS server",
"description": "An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS server",
"x-ms-mutability": [
"create",
"read"
]
},
"infrastructureSubnetResourceId": {
"controlPlaneSubnetResourceId": {
"type": "string",
"description": "Subnet Resource Id for Infrastructure components should be in the same VNET as 'InfrastructureSubnetResourceId'. Must not overlap with ServiceCidr",
"description": "Resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet defined in appSubnetResourceId. Must not overlap with the IP range defined in platformReservedCidr, if defined.",
"x-ms-mutability": [
"create",
"read"
]
},
"runtimeSubnetResourceName": {
"appSubnetResourceId": {
"type": "string",
"description": " Subnet Resource Name to which the ContainerApp Containers are injected into, should be in the same VNET as 'InfrastructureSubnetResourceId'. Must not overlap with ServiceCidr",
"description": "Resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet defined in appSubnetResourceId. Must not overlap with the IP range defined in platformReservedCidr, if defined.",
"x-ms-mutability": [
"create",
"read"
]
},
"dockerBridgeCidr": {
"type": "string",
"description": "CIDR notation IP range assigned to the Docker bridge, network. It must not overlap with any Subnet IP ranges or the infrastructure service address range.",
"description": "CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the IP range defined in platformReservedCidr, if defined.",
"x-ms-mutability": [
"create",
"read"
Expand Down Expand Up @@ -541,6 +532,10 @@
"$ref": "#/definitions/AppLogsConfiguration",
"description": "Cluster configuration which enables the log daemon to export\napp logs to a destination. Currently only \"log-analytics\" is\nsupported"
},
"containerAppsConfiguration": {
"$ref": "#/definitions/ContainerAppsConfiguration",
"description": "Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration"
},
"aksResourceID": {
"type": "string",
"x-ms-mutability": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"parameters": {
"subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"resourceGroupName": "rg",
"name": "testcontainerApp0",
"api-version": "2021-03-01"
},
"responses": {
"200": {
"headers": {},
"body": {
"value": [
{
"name": "secret1",
"value": "value1"
},
{
"name": "secret2",
"value": "value2"
}
]
}
}
}
}

0 comments on commit 066b3ac

Please sign in to comment.