Skip to content

crg support for machines - #10281

Open
Erin Borders (erinborders) wants to merge 3 commits into
Azure:mainfrom
erinborders:erinborders/crgsupport
Open

crg support for machines#10281
Erin Borders (erinborders) wants to merge 3 commits into
Azure:mainfrom
erinborders:erinborders/crgsupport

Conversation

@erinborders

@erinborders Erin Borders (erinborders) commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ❌ Action needed

Breaking Changes
❌ 1
❌Azure CLI Extensions Breaking Change Test
❌aks-preview
rule cmd_name rule_message suggest_message
1010 - ParaPropUpdate aks machine add cmd aks machine add update parameter spot_max_price: updated property default from nan to nan please change property default from nan to nan for parameter spot_max_price of cmd aks machine add
⚠️ 1006 - ParaAdd aks machine add cmd aks machine add added parameter capacity_reservation_group

This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install azdev required)
  • My extension version conforms to the Extension version schema

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.json automatically.
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.

Copilot AI lite review requested due to automatic review settings August 31, 2026 18:14
@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi Erin Borders (@erinborders),
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in pyproject.toml (or setup.py, if the extension has not migrated yet) as well.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds preview support for associating an AKS machine with an Azure Capacity Reservation Group (CRG) via a new --crg-id argument on az aks machine add, wiring it through machine construction and documenting/testing the behavior in the aks-preview extension.

Changes:

  • Add --crg-id (preview) to az aks machine add argument surface and help.
  • Populate MachineProperties.capacity_reservation when crg_id is provided.
  • Add unit tests covering set/omit behavior for regular machines and rejection for FlexNodes pools.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/aks-preview/HISTORY.rst Notes the new preview --crg-id support for az aks machine add.
src/aks-preview/azext_aks_preview/tests/latest/test_custom.py Adds unit tests for setting/omitting capacity reservation and validates FlexNodes rejection + argument surface.
src/aks-preview/azext_aks_preview/machine.py Wires crg_id into constructed MachineProperties.capacity_reservation.
src/aks-preview/azext_aks_preview/custom.py Adds crg_id parameter to aks_machine_add and passes through via raw_parameters.
src/aks-preview/azext_aks_preview/_params.py Exposes crg_id on aks machine add with validate_crg_id and preview flag.
src/aks-preview/azext_aks_preview/_help.py Documents --crg-id for aks machine add.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Aug 31, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Thank you for your contribution Erin Borders (@erinborders)! We will review the pull request and get back to you soon.

@yonzhan

Copy link
Copy Markdown
Collaborator

AKS

@FumingZhang

Copy link
Copy Markdown
Member

Please resolve the failed linter check by adding a new entry to src/aks-preview/linter_exclusions.yml.

  • FAIL - HIGH severity: option_length_too_long
    Parameter: aks machine add, capacity_reservation_group - The lengths of all options ['--capacity-reservation-group'] are longer than threshold 22. Argument capacity_reservation_group must have a short abbreviation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

customer-reported Issues that are reported by GitHub users external to the Azure organization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants