From 5456a46833aa868cca46c2dcdd0a960390a72575 Mon Sep 17 00:00:00 2001 From: "reneeli@microsoft.com" Date: Thu, 22 May 2025 19:25:54 +1200 Subject: [PATCH 1/3] Add virtualmachines related properties to GA API --- .../AgentPoolsCreate_TypeVirtualMachines.json | 139 ++++++++++++++++++ .../stable/2025-04-01/managedClusters.json | 103 ++++++++++++- 2 files changed, 241 insertions(+), 1 deletion(-) create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-04-01/examples/AgentPoolsCreate_TypeVirtualMachines.json diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-04-01/examples/AgentPoolsCreate_TypeVirtualMachines.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-04-01/examples/AgentPoolsCreate_TypeVirtualMachines.json new file mode 100644 index 000000000000..60494257beee --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-04-01/examples/AgentPoolsCreate_TypeVirtualMachines.json @@ -0,0 +1,139 @@ +{ + "parameters": { + "api-version": "2025-04-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg1", + "resourceName": "clustername1", + "agentPoolName": "agentpool1", + "parameters": { + "properties": { + "orchestratorVersion": "1.9.6", + "osType": "Linux", + "tags": { + "name1": "val1" + }, + "nodeLabels": { + "key1": "val1" + }, + "nodeTaints": [ + "Key1=Value1:NoSchedule" + ], + "type": "VirtualMachines", + "virtualMachinesProfile": { + "scale": { + "manual": [ + { + "size": "Standard_D2_v2", + "count": 3 + }, + { + "size": "Standard_D2_v3", + "count": 2 + } + ] + } + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1", + "type": "Microsoft.ContainerService/managedClusters/agentPools", + "name": "agentpool1", + "properties": { + "provisioningState": "Succeeded", + "orchestratorVersion": "1.9.6", + "currentOrchestratorVersion": "1.9.6", + "maxPods": 110, + "osType": "Linux", + "tags": { + "name1": "val1" + }, + "nodeLabels": { + "key1": "val1" + }, + "nodeTaints": [ + "Key1=Value1:NoSchedule" + ], + "type": "VirtualMachines", + "virtualMachinesProfile": { + "scale": { + "manual": [ + { + "size": "Standard_D2_v2", + "count": 3 + }, + { + "size": "Standard_D2_v3", + "count": 2 + } + ] + } + }, + "virtualMachineNodesStatus": [ + { + "size": "Standard_D2_v2", + "count": 3 + }, + { + "size": "Standard_D2_v3", + "count": 2 + } + ], + "nodeImageVersion": "AKSUbuntu-1804gen2containerd-2021.09.11" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1", + "type": "Microsoft.ContainerService/managedClusters/agentPools", + "name": "agentpool1", + "properties": { + "provisioningState": "Creating", + "orchestratorVersion": "1.9.6", + "currentOrchestratorVersion": "1.9.6", + "maxPods": 110, + "osType": "Linux", + "tags": { + "name1": "val1" + }, + "nodeLabels": { + "key1": "val1" + }, + "nodeTaints": [ + "Key1=Value1:NoSchedule" + ], + "type": "VirtualMachines", + "virtualMachinesProfile": { + "scale": { + "manual": [ + { + "size": "Standard_D2_v2", + "count": 3 + }, + { + "size": "Standard_D2_v3", + "count": 2 + } + ] + } + }, + "virtualMachineNodesStatus": [ + { + "size": "Standard_D2_v2", + "count": 3 + }, + { + "size": "Standard_D2_v3", + "count": 2 + } + ], + "nodeImageVersion": "AKSUbuntu-1804gen2containerd-2021.09.11" + } + } + } + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-04-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-04-01/managedClusters.json index ac510de799dc..e4041f837fca 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-04-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-04-01/managedClusters.json @@ -3259,6 +3259,96 @@ "clientId" ] }, + "VirtualMachinesProfile": { + "type": "object", + "properties": { + "scale": { + "$ref": "#/definitions/ScaleProfile", + "description": "Specifications on how to scale a VirtualMachines agent pool." + } + }, + "description": "Specifications on VirtualMachines agent pool." + }, + "ScaleProfile": { + "type": "object", + "properties": { + "manual": { + "type": "array", + "items": { + "$ref": "#/definitions/ManualScaleProfile" + }, + "x-ms-identifiers": [], + "description": "Specifications on how to scale the VirtualMachines agent pool to a fixed size." + }, + "autoscale": { + "type": "object", + "items": { + "$ref": "#/definitions/AutoScaleProfile" + }, + "x-ms-identifiers": [], + "description": "Specifications on how to auto-scale the VirtualMachines agent pool within a predefined size range." + } + }, + "description": "Specifications on how to scale a VirtualMachines agent pool." + }, + "ManualScaleProfile": { + "type": "object", + "properties": { + "size": { + "type": "string", + "description": "VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', 'Standard_E16s_v3' or 'Standard_D16s_v5'." + }, + "count": { + "type": "integer", + "format": "int32", + "description": "Number of nodes." + } + }, + "description": "Specifications on number of machines." + }, + "AutoScaleProfile": { + "type": "object", + "properties": { + "size": { + "type": "string", + "description": "VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', 'Standard_E16s_v3' or 'Standard_D16s_v5'." + }, + "minCount": { + "type": "integer", + "format": "int32", + "description": "The minimum number of nodes of the specified sizes." + }, + "maxCount": { + "type": "integer", + "format": "int32", + "description": "The maximum number of nodes of the specified sizes." + } + }, + "description": "Specifications on auto-scaling." + }, + "VirtualMachineNodesStatus": { + "type": "array", + "items": { + "$ref": "#/definitions/VirtualMachineNodes" + }, + "x-ms-identifiers": [], + "description": "The status of nodes in a VirtualMachines agent pool." + }, + "VirtualMachineNodes": { + "type": "object", + "properties": { + "size": { + "type": "string", + "description": "The VM size of the agents used to host this group of nodes." + }, + "count": { + "type": "integer", + "format": "int32", + "description": "Number of nodes." + } + }, + "description": "Current status on a group of nodes of the same vm size." + }, "ManagedClusterAgentPoolProfileProperties": { "type": "object", "properties": { @@ -3516,6 +3606,12 @@ "gatewayProfile": { "$ref": "#/definitions/AgentPoolGatewayProfile", "description": "Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is not Gateway." + }, + "virtualMachinesProfile": { + "$ref": "#/definitions/VirtualMachinesProfile" + }, + "virtualMachineNodesStatus": { + "$ref": "#/definitions/VirtualMachineNodesStatus" } }, "description": "Properties for the container service agent pool profile." @@ -3641,7 +3737,8 @@ "type": "string", "enum": [ "VirtualMachineScaleSets", - "AvailabilitySet" + "AvailabilitySet", + "VirtualMachines" ], "x-ms-enum": { "name": "AgentPoolType", @@ -3654,6 +3751,10 @@ { "value": "AvailabilitySet", "description": "Use of this is strongly discouraged." + }, + { + "value": "VirtualMachines", + "description": "Create an Agent Pool backed by a Single Instance VM orchestration mode." } ] }, From c9d889ba82009c3b25390ecb33b1d726e511c49b Mon Sep 17 00:00:00 2001 From: "reneeli@microsoft.com" Date: Thu, 22 May 2025 19:56:52 +1200 Subject: [PATCH 2/3] Remove autoscale --- .../stable/2025-04-01/managedClusters.json | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-04-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-04-01/managedClusters.json index e4041f837fca..f688a0448d5a 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-04-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-04-01/managedClusters.json @@ -3279,14 +3279,6 @@ }, "x-ms-identifiers": [], "description": "Specifications on how to scale the VirtualMachines agent pool to a fixed size." - }, - "autoscale": { - "type": "object", - "items": { - "$ref": "#/definitions/AutoScaleProfile" - }, - "x-ms-identifiers": [], - "description": "Specifications on how to auto-scale the VirtualMachines agent pool within a predefined size range." } }, "description": "Specifications on how to scale a VirtualMachines agent pool." @@ -3306,26 +3298,6 @@ }, "description": "Specifications on number of machines." }, - "AutoScaleProfile": { - "type": "object", - "properties": { - "size": { - "type": "string", - "description": "VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', 'Standard_E16s_v3' or 'Standard_D16s_v5'." - }, - "minCount": { - "type": "integer", - "format": "int32", - "description": "The minimum number of nodes of the specified sizes." - }, - "maxCount": { - "type": "integer", - "format": "int32", - "description": "The maximum number of nodes of the specified sizes." - } - }, - "description": "Specifications on auto-scaling." - }, "VirtualMachineNodesStatus": { "type": "array", "items": { From 9d358c6971ec93a37105667e160d0aebf6aa71e4 Mon Sep 17 00:00:00 2001 From: "reneeli@microsoft.com" Date: Thu, 22 May 2025 21:27:29 +1200 Subject: [PATCH 3/3] Add example file ref --- .../aks/stable/2025-04-01/managedClusters.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-04-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-04-01/managedClusters.json index f688a0448d5a..a25492754664 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-04-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-04-01/managedClusters.json @@ -1225,6 +1225,9 @@ }, "Create Agent Pool with Dedicated Host Group": { "$ref": "./examples/AgentPoolsCreate_DedicatedHostGroup.json" + }, + "Create Agent Pool with VirtualMachines pool type": { + "$ref": "./examples/AgentPoolsCreate_TypeVirtualMachines.json" } } },