From 4d5648c8287f6a6a47e450a5ff3204c586229893 Mon Sep 17 00:00:00 2001 From: Marwan Ahmed Date: Thu, 8 Jul 2021 12:33:38 -0700 Subject: [PATCH 1/4] add scale down mode --- .../ManagedClustersCreate_Update.json | 3 +++ .../stable/2021-07-01/managedClusters.json | 25 +++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-02-01/examples/ManagedClustersCreate_Update.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-02-01/examples/ManagedClustersCreate_Update.json index e619a763e923..a36bbfc437cc 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-02-01/examples/ManagedClustersCreate_Update.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-02-01/examples/ManagedClustersCreate_Update.json @@ -20,6 +20,7 @@ "vmSize": "Standard_DS1_v2", "osType": "Linux", "type": "VirtualMachineScaleSets", + "scaleDownMode": "Deallocate", "availabilityZones": [ "1", "2", @@ -92,6 +93,7 @@ "provisioningState": "Succeeded", "orchestratorVersion": "1.9.6", "type": "VirtualMachineScaleSets", + "scaleDownMode": "Deallocate", "availabilityZones": [ "1", "2", @@ -177,6 +179,7 @@ "provisioningState": "Creating", "orchestratorVersion": "1.9.6", "type": "VirtualMachineScaleSets", + "scaleDownMode": "Deallocate", "availabilityZones": [ "1", "2", diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-07-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-07-01/managedClusters.json index 45f11a2cd533..4d14378f75e3 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-07-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-07-01/managedClusters.json @@ -2371,6 +2371,9 @@ "type": "boolean", "description": "Whether to enable auto-scaler" }, + "scaleDownMode": { + "$ref": "#/definitions/ScaleDownMode" + }, "type": { "$ref": "#/definitions/AgentPoolType" }, @@ -4183,6 +4186,28 @@ "title": "The max price (in US Dollars) you are willing to pay for spot instances. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand.", "description": "Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing)" }, + "ScaleDownMode": { + "type": "string", + "enum": [ + "Delete", + "Deallocate" + ], + "x-ms-enum": { + "name": "ScaleDownMode", + "modelAsString": true, + "values": [ + { + "value": "Delete", + "description": "Delete mode wil create new instances during scale up and remove instances during scale down." + }, + { + "value": "Deallocate", + "description": "Deallocate mode will attempt to start deallocated instances (if they exist) during scale up and deallocate instances during scale down." + } + ] + }, + "description": "Determines the actions taken in regards to VMs during scaling up and down. This also effects the cluster autoscaler behavior." + }, "ProximityPlacementGroupID": { "type": "string", "description": "The ID for Proximity Placement Group." From 735f55fe697e2181b4fe8ff750f2b238d3010882 Mon Sep 17 00:00:00 2001 From: Marwan Ahmed Date: Thu, 8 Jul 2021 19:30:42 -0700 Subject: [PATCH 2/4] address comments --- .../stable/2021-07-01/managedClusters.json | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-07-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-07-01/managedClusters.json index 4d14378f75e3..014b8037513a 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-07-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-07-01/managedClusters.json @@ -2372,7 +2372,9 @@ "description": "Whether to enable auto-scaler" }, "scaleDownMode": { - "$ref": "#/definitions/ScaleDownMode" + "$ref": "#/definitions/ScaleDownMode", + "title": "The scale down mode to use when scaling the Agent Pool.", + "description": "This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete." }, "type": { "$ref": "#/definitions/AgentPoolType" @@ -4192,21 +4194,24 @@ "Delete", "Deallocate" ], + "externalDocs": { + "url": "https://docs.microsoft.com/azure/virtual-machines/states-billing" + }, "x-ms-enum": { "name": "ScaleDownMode", "modelAsString": true, "values": [ { "value": "Delete", - "description": "Delete mode wil create new instances during scale up and remove instances during scale down." + "description": "Create new instances during scale up and remove instances during scale down." }, { "value": "Deallocate", - "description": "Deallocate mode will attempt to start deallocated instances (if they exist) during scale up and deallocate instances during scale down." + "description": "Attempt to start deallocated instances (if they exist) during scale up and deallocate instances during scale down." } ] }, - "description": "Determines the actions taken in regards to VMs during scaling up and down. This also effects the cluster autoscaler behavior." + "description": "Describes how VMs are added to or removed from Agent Pools" }, "ProximityPlacementGroupID": { "type": "string", From bb5ac293d2042db157824ce87763b59931f8db7b Mon Sep 17 00:00:00 2001 From: Marwan Ahmed Date: Mon, 12 Jul 2021 13:21:05 -0700 Subject: [PATCH 3/4] fix markdown link --- .../stable/2021-07-01/managedClusters.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-07-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-07-01/managedClusters.json index 014b8037513a..3272995fcc2a 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-07-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-07-01/managedClusters.json @@ -4194,9 +4194,6 @@ "Delete", "Deallocate" ], - "externalDocs": { - "url": "https://docs.microsoft.com/azure/virtual-machines/states-billing" - }, "x-ms-enum": { "name": "ScaleDownMode", "modelAsString": true, @@ -4211,7 +4208,7 @@ } ] }, - "description": "Describes how VMs are added to or removed from Agent Pools" + "description": "Describes how VMs are added to or removed from Agent Pools. See [billing states](https://docs.microsoft.com/azure/virtual-machines/states-billing)." }, "ProximityPlacementGroupID": { "type": "string", From d47924c7194cbc0f2fa4ec8d0bb9719ca25f3b7a Mon Sep 17 00:00:00 2001 From: Marwan Ahmed Date: Tue, 13 Jul 2021 06:41:12 -0700 Subject: [PATCH 4/4] update proper api version --- .../2020-02-01/examples/ManagedClustersCreate_Update.json | 3 --- .../2021-07-01/examples/ManagedClustersCreate_Update.json | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-02-01/examples/ManagedClustersCreate_Update.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-02-01/examples/ManagedClustersCreate_Update.json index a36bbfc437cc..e619a763e923 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-02-01/examples/ManagedClustersCreate_Update.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-02-01/examples/ManagedClustersCreate_Update.json @@ -20,7 +20,6 @@ "vmSize": "Standard_DS1_v2", "osType": "Linux", "type": "VirtualMachineScaleSets", - "scaleDownMode": "Deallocate", "availabilityZones": [ "1", "2", @@ -93,7 +92,6 @@ "provisioningState": "Succeeded", "orchestratorVersion": "1.9.6", "type": "VirtualMachineScaleSets", - "scaleDownMode": "Deallocate", "availabilityZones": [ "1", "2", @@ -179,7 +177,6 @@ "provisioningState": "Creating", "orchestratorVersion": "1.9.6", "type": "VirtualMachineScaleSets", - "scaleDownMode": "Deallocate", "availabilityZones": [ "1", "2", diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-07-01/examples/ManagedClustersCreate_Update.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-07-01/examples/ManagedClustersCreate_Update.json index 3506d51f4db0..69c71a5ad646 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-07-01/examples/ManagedClustersCreate_Update.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-07-01/examples/ManagedClustersCreate_Update.json @@ -24,6 +24,7 @@ "vmSize": "Standard_DS1_v2", "osType": "Linux", "type": "VirtualMachineScaleSets", + "scaleDownMode": "Deallocate", "availabilityZones": [ "1", "2", @@ -108,6 +109,7 @@ "provisioningState": "Succeeded", "orchestratorVersion": "1.9.6", "type": "VirtualMachineScaleSets", + "scaleDownMode": "Deallocate", "availabilityZones": [ "1", "2", @@ -209,6 +211,7 @@ "provisioningState": "Creating", "orchestratorVersion": "1.9.6", "type": "VirtualMachineScaleSets", + "scaleDownMode": "Deallocate", "availabilityZones": [ "1", "2",