-
Notifications
You must be signed in to change notification settings - Fork 1.6k
az aks nodepool update supports crg id #9811
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -226,6 +226,6 @@ Released version and adopted API version | |
| * - 19.0.0b24 ~ 20.0.0b2 | ||
| - 2026-01-02-preview | ||
| - | ||
| * - 20.0.0b3 ~ latest | ||
| * - 20.0.0b4 ~ latest | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please restore the change for this file |
||
| - 2026-02-02-preview | ||
| - | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2506,6 +2506,9 @@ | |||||
| - name: --gpu-driver | ||||||
| type: string | ||||||
| short-summary: Whether to install driver for GPU node pool. Possible values are "Install" or "None". | ||||||
| - name: --crg-id | ||||||
| type: string | ||||||
| short-summary: The crg-id used to associate the existing nodepool with the existing Capacity Reservation Group resource. | ||||||
|
||||||
| short-summary: The crg-id used to associate the existing nodepool with the existing Capacity Reservation Group resource. | |
| short-summary: The Capacity Reservation Group (CRG) ID used to associate the existing nodepool with the existing Capacity Reservation Group resource. |
Copilot
AI
Apr 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example CRG resource ID uses the provider Microsoft.ContainerService/CapacityReservationGroups, but Capacity Reservation Groups are Microsoft.Compute/capacityReservationGroups (as also described in the SDK model docs). Using the wrong provider in docs will lead users to copy/paste an ID that the RP rejects—please update the example accordingly.
| text: az aks nodepool update -g MyResourceGroup -n MyNodePool --cluster-name MyMC --node-vm-size VMSize --crg-id "/subscriptions/SubID/resourceGroups/ResourceGroupName/providers/Microsoft.ContainerService/CapacityReservationGroups/MyCRGID" | |
| text: az aks nodepool update -g MyResourceGroup -n MyNodePool --cluster-name MyMC --node-vm-size VMSize --crg-id "/subscriptions/SubID/resourceGroups/ResourceGroupName/providers/Microsoft.Compute/capacityReservationGroups/MyCRGID" |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -1943,6 +1943,15 @@ def update_fips_image(self, agentpool: AgentPool) -> AgentPool: | |||||||
| agentpool.enable_fips = False | ||||||||
|
|
||||||||
| return agentpool | ||||||||
|
|
||||||||
|
||||||||
Copilot
AI
Apr 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update_crg uses self.context.get_crg_id(), which currently prefers agentpool.capacity_reservation_group_id over the user-provided --crg-id once an agentpool is attached. This means az aks nodepool update --crg-id <newId> will be ignored when the nodepool already has a CRG ID set. Consider reading crg_id directly from context.raw_param (and only applying it when explicitly provided) so the update honors the CLI argument.
| agentpool.capacity_reservation_group_id = self.context.get_crg_id() | |
| if "crg_id" in self.context.raw_param: | |
| agentpool.capacity_reservation_group_id = self.context.raw_param.get("crg_id") |
Copilot
AI
Apr 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New --crg-id behavior is introduced by calling update_crg from the update pipeline, but there’s no unit test asserting that providing --crg-id actually results in capacity_reservation_group_id being updated on the outgoing AgentPool object. Since this decorator already has dedicated unit tests, please add a test case covering the update scenario (including when an existing CRG ID is present).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change removes the Pending section entirely, even though the file’s own guidance says new items should go under Pending when not releasing, and releases should move items out of Pending while keeping an (empty) Pending section for future changes. It also drops the previously listed Pending entry about
az aks nodepool updateVMSS resize support, so that change is no longer documented in any release section.