Skip to content

Commit cf7097e

Browse files
[AKS] az aks nodepool update, az aks nodepool auto-scale, --enable-cluster-autoscaler: Add CAS support for VMS agent pools (#33801)
Co-authored-by: reneeli <reneeli@microsoft.com>
1 parent 2036a96 commit cf7097e

9 files changed

Lines changed: 4215 additions & 18 deletions

File tree

src/azure-cli/azure/cli/command_modules/acs/_help.py

Lines changed: 63 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -775,13 +775,13 @@
775775
parameters:
776776
- name: --enable-cluster-autoscaler -e
777777
type: bool
778-
short-summary: Enable cluster autoscaler.
778+
short-summary: Enable cluster autoscaler. For VirtualMachines pools, converts all manual scale profiles to autoscale profiles using the same min/max counts.
779779
- name: --disable-cluster-autoscaler -d
780780
type: bool
781-
short-summary: Disable cluster autoscaler.
781+
short-summary: Disable cluster autoscaler. For VirtualMachines pools, converts all autoscale profiles back to manual scale profiles.
782782
- name: --update-cluster-autoscaler -u
783783
type: bool
784-
short-summary: Update min-count or max-count for cluster autoscaler.
784+
short-summary: Update min-count or max-count for cluster autoscaler. Not supported for VirtualMachines pools; use 'az aks nodepool auto-scale update' instead.
785785
- name: --min-count
786786
type: int
787787
short-summary: Minimum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 1000]
@@ -2182,13 +2182,13 @@
21822182
parameters:
21832183
- name: --enable-cluster-autoscaler -e
21842184
type: bool
2185-
short-summary: Enable cluster autoscaler.
2185+
short-summary: Enable cluster autoscaler. For VirtualMachines pools, converts all manual scale profiles to autoscale profiles using the same min/max counts.
21862186
- name: --disable-cluster-autoscaler -d
21872187
type: bool
2188-
short-summary: Disable cluster autoscaler.
2188+
short-summary: Disable cluster autoscaler. For VirtualMachines pools, converts all autoscale profiles back to manual scale profiles.
21892189
- name: --update-cluster-autoscaler -u
21902190
type: bool
2191-
short-summary: Update min-count or max-count for cluster autoscaler.
2191+
short-summary: Update min-count or max-count for cluster autoscaler. Not supported for VirtualMachines pools; use 'az aks nodepool auto-scale update' instead.
21922192
- name: --min-count
21932193
type: int
21942194
short-summary: Minimum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [0, 1000] for user nodepool, and [1,1000] for system nodepool.
@@ -2422,7 +2422,7 @@
24222422

24232423
helps["aks nodepool manual-scale"] = """
24242424
type: group
2425-
short-summary: Commands to manage nodepool virtualMachineProfile.scale.manual.
2425+
short-summary: Commands to manage nodepool virtualMachinesProfile.scale.manual.
24262426
"""
24272427

24282428
helps["aks nodepool manual-scale add"] = """
@@ -2461,6 +2461,62 @@
24612461
short-summary: Comma-separated list of sizes in the manual to be deleted.
24622462
"""
24632463

2464+
helps["aks nodepool auto-scale"] = """
2465+
type: group
2466+
short-summary: Commands to manage nodepool virtualMachinesProfile.scale.autoscale.
2467+
"""
2468+
2469+
helps["aks nodepool auto-scale add"] = """
2470+
type: command
2471+
short-summary: Add a new autoscale profile to a VirtualMachines agentpool in the managed Kubernetes cluster.
2472+
parameters:
2473+
- name: --node-vm-size
2474+
type: string
2475+
short-summary: VM size for the autoscale profile.
2476+
- name: --min-count
2477+
type: int
2478+
short-summary: Minimum number of nodes for autoscaling.
2479+
- name: --max-count
2480+
type: int
2481+
short-summary: Maximum number of nodes for autoscaling.
2482+
examples:
2483+
- name: Add an autoscale profile to a VirtualMachines agentpool
2484+
text: az aks nodepool auto-scale add -g MyResourceGroup --cluster-name MyMC --name MyNodePool --node-vm-size Standard_D2s_v3 --min-count 3 --max-count 5
2485+
"""
2486+
2487+
helps["aks nodepool auto-scale update"] = """
2488+
type: command
2489+
short-summary: Update an existing autoscale profile of a VirtualMachines agentpool in the managed Kubernetes cluster.
2490+
parameters:
2491+
- name: --current-node-vm-size
2492+
type: string
2493+
short-summary: The current VM size of the autoscale profile to be updated.
2494+
- name: --node-vm-size
2495+
type: string
2496+
short-summary: The new VM size for the autoscale profile.
2497+
- name: --min-count
2498+
type: int
2499+
short-summary: Minimum number of nodes for autoscaling.
2500+
- name: --max-count
2501+
type: int
2502+
short-summary: Maximum number of nodes for autoscaling.
2503+
examples:
2504+
- name: Update an existing autoscale profile in a VirtualMachines agentpool
2505+
text: az aks nodepool auto-scale update -g MyResourceGroup --cluster-name MyMC --name MyNodePool --current-node-vm-size Standard_D2s_v3 --node-vm-size Standard_D8s_v3 --min-count 2 --max-count 4
2506+
"""
2507+
2508+
helps["aks nodepool auto-scale delete"] = """
2509+
type: command
2510+
short-summary: Delete an existing autoscale profile from a VirtualMachines agentpool in the managed Kubernetes cluster.
2511+
parameters:
2512+
- name: --current-node-vm-size
2513+
type: string
2514+
short-summary: The VM size of the autoscale profile to be deleted.
2515+
examples:
2516+
- name: Delete an autoscale profile from a VirtualMachines agentpool
2517+
text: az aks nodepool auto-scale delete -g MyResourceGroup --cluster-name MyMC --name MyNodePool --current-node-vm-size Standard_D2s_v3
2518+
"""
2519+
24642520
helps["aks show"] = """
24652521
type: command
24662522
short-summary: Show the details for a managed Kubernetes cluster.

src/azure-cli/azure/cli/command_modules/acs/_params.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,20 @@ def load_arguments(self, _):
12311231
with self.argument_context("aks nodepool manual-scale delete") as c:
12321232
c.argument("current_vm_sizes")
12331233

1234+
with self.argument_context("aks nodepool auto-scale add") as c:
1235+
c.argument("node_vm_size")
1236+
c.argument("min_count", type=int)
1237+
c.argument("max_count", type=int)
1238+
1239+
with self.argument_context("aks nodepool auto-scale update") as c:
1240+
c.argument("current_node_vm_size")
1241+
c.argument("node_vm_size")
1242+
c.argument("min_count", type=int)
1243+
c.argument("max_count", type=int)
1244+
1245+
with self.argument_context("aks nodepool auto-scale delete") as c:
1246+
c.argument("current_node_vm_size")
1247+
12341248
with self.argument_context('aks command invoke') as c:
12351249
c.argument('command_string', options_list=[
12361250
"--command", "-c"], help='the command to run')

0 commit comments

Comments
 (0)