az aks nodepool update supports crg id#9811
az aks nodepool update supports crg id#9811zjpjack-github wants to merge 10 commits intoAzure:mainfrom
Conversation
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| aks nodepool update | cmd aks nodepool update added parameter crg_id |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
CodeGen Tools Feedback CollectionThank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey |
|
There was a problem hiding this comment.
Pull request overview
This PR adds preview support in the aks-preview extension for associating an existing AKS nodepool with a Capacity Reservation Group via az aks nodepool update --crg-id, along with the required CLI surface updates and a version bump.
Changes:
- Add
--crg-idargument wiring foraks nodepool updateand pass it through the nodepool update decorator pipeline. - Update command help/examples and bump extension version/release notes to
20.0.0b4. - Introduce an
update_crgstep during nodepool update to setcapacity_reservation_group_idon the outgoing AgentPool model.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/aks-preview/setup.py | Bumps extension version to 20.0.0b4. |
| src/aks-preview/azext_aks_preview/custom.py | Adds crg_id parameter to aks_agentpool_update signature so it flows into raw_parameters. |
| src/aks-preview/azext_aks_preview/agentpool_decorator.py | Adds update_crg and calls it from the nodepool update flow. |
| src/aks-preview/azext_aks_preview/_params.py | Adds crg_id argument (validator + preview) to aks nodepool update. |
| src/aks-preview/azext_aks_preview/_help.py | Documents --crg-id and adds an example invocation. |
| src/aks-preview/README.rst | Updates “released version” table to reflect 20.0.0b4. |
| src/aks-preview/HISTORY.rst | Adds 20.0.0b4 release notes entry (but removes Pending section). |
FumingZhang
left a comment
There was a problem hiding this comment.
please fix failed unit test cases
| * Update the minimum required cli core version to `2.76.0` (actually since `20.0.0b3`). | ||
| * `az aks upgrade`: Add `--k8s-support-plan` and `--tier` flag support to allow cluster support plan and tier configuration during cluster upgrade. | ||
|
|
||
| 20.0.0.b7 |
There was a problem hiding this comment.
The entry says 20.0.0.b7 but the actual version in setup.py is 20.0.0b7. Is it right?
There was a problem hiding this comment.
fix this, should be 20.0.0b7
| decorator.update_blue_green_upgrade_settings = Mock(return_value=agentpool) | ||
| decorator.update_gpu_profile = Mock(return_value=agentpool) | ||
| decorator.update_gpu_mig_strategy = Mock(return_value=agentpool) | ||
| decorator.update_crg = Mock(return_value=agentpool) |
There was a problem hiding this comment.
The PR only adds unit tests. Is it possible to add scenario test to verify your change?
There was a problem hiding this comment.
synced offline about the scenario test. It is a bit hard for crg related because we need to setup some extra steps for role assignment and create CRG. cx is waiting for this to temporarily unblock them
|
|
||
| 20.0.0b7 | ||
| +++++++ | ||
| * `az aks nodepool update --crg-id`: Allow updating `--crg-id` to associate an existing Capacity Reservation Group with a nodepool not currently associated with one. |
There was a problem hiding this comment.
please include the changelogs which are under Pending section into the latest version
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az aks nodepool update --crg-id
Test the command as follows
(1) create a capacity reservation group, add capacity reservations to the CRG
(2) create user assigned msi, and assign contributor role to the resource group
(3) create MC
(4) create AP w/o CRG
(5) update AP with CRG
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.