[AKS] az aks nodepool add/update: Add --enable-managed-dranet - #34003
[AKS] az aks nodepool add/update: Add --enable-managed-dranet#34003Evan Baker (rbtr) wants to merge 5 commits into
az aks nodepool add/update: Add --enable-managed-dranet#34003Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Thank you for your contribution Evan Baker (@rbtr)! We will review the pull request and get back to you soon. |
There was a problem hiding this comment.
Pull request overview
Adds first-class support in core azure-cli for enabling Managed DRANET on AKS node pools via az aks nodepool add and az aks nodepool update, including plumbing through parameters/decorators and updating the ContainerService SDK dependency to a version that contains the necessary models.
Changes:
- Add
--enable-managed-dranetto nodepool add/update args, help, and the agentpool decorator logic to setnetworkProfile.dranet.mode=Managed. - Upgrade
azure-mgmt-containerservicefrom41.5.0to41.6.0across CLI packaging/requirements. - Add unit test coverage for the new context getter and decorator network-profile behavior.
Show a summary per file
| File | Description |
|---|---|
| src/azure-cli/setup.py | Bumps azure-mgmt-containerservice dependency range to ~= 41.6.0. |
| src/azure-cli/requirements.py3.windows.txt | Pins azure-mgmt-containerservice to 41.6.0 on Windows. |
| src/azure-cli/requirements.py3.Linux.txt | Pins azure-mgmt-containerservice to 41.6.0 on Linux. |
| src/azure-cli/requirements.py3.Darwin.txt | Pins azure-mgmt-containerservice to 41.6.0 on macOS. |
| src/azure-cli/HISTORY.rst | Adds release note entry for the new nodepool flag. |
| src/azure-cli/azure/cli/command_modules/acs/custom.py | Wires enable_managed_dranet through add/update command handlers via raw_parameters = locals(). |
| src/azure-cli/azure/cli/command_modules/acs/agentpool_decorator.py | Implements context getter and applies Managed DRANET into AgentPoolNetworkProfile. |
| src/azure-cli/azure/cli/command_modules/acs/_params.py | Adds enable_managed_dranet as a store_true argument for nodepool add/update. |
| src/azure-cli/azure/cli/command_modules/acs/_help.py | Documents --enable-managed-dranet for nodepool add/update. |
| src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_agentpool_decorator.py | Adds unit tests for DRANET getter and network profile setup/update behavior. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 10/10 changed files
- Comments generated: 2
- Review effort level: Lite
| def get_enable_managed_dranet(self) -> bool: | ||
| """Obtain the value of enable_managed_dranet.""" | ||
| return self.raw_param.get("enable_managed_dranet") |
|
|
||
| **AKS** | ||
|
|
||
| * `az aks nodepool add/update`: Add `--enable-managed-dranet` to enable Managed DRANET on a node pool. |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
| allowed_host_ports = self.context.get_allowed_host_ports() | ||
| if (asg_ids or allowed_host_ports) and not agentpool.network_profile: | ||
| enable_managed_dranet = self.context.get_enable_managed_dranet() | ||
| if (asg_ids or allowed_host_ports or enable_managed_dranet) and not agentpool.network_profile: |
There was a problem hiding this comment.
consider apply is None check for asg_ids and allowed_host_ports
| 'azure-mgmt-containerregistry==15.1.0b2', | ||
| 'azure-mgmt-containerregistrytasks==1.0.0b1', | ||
| 'azure-mgmt-containerservice~=41.5.0', | ||
| 'azure-mgmt-containerservice~=41.6.0', |
There was a problem hiding this comment.
Please hold off on upgrading the SDK together with the feature changes, since bumping the SDK requires other updates as well. After the bumping PR #34011 is merged, please rebase from the dev branch.
There was a problem hiding this comment.
Hey Evan Baker (@rbtr), #34011 has been merge, now you may rebase from dev branch to pick up that change.
c749487 to
c20dfab
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
c20dfab to
ab3cdb0
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
FumingZhang
left a comment
There was a problem hiding this comment.
lgtm
please fix failed azdev-style check
/home/runner/work/azure-cli/azure-cli/src/azure-cli/azure/cli/command_modules/acs/agentpool_decorator.py:2881:13: W503 line break before binary operator
/home/runner/work/azure-cli/azure-cli/src/azure-cli/azure/cli/command_modules/acs/agentpool_decorator.py:2882:13: W503 line break before binary operator
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
🤖 PR Validation — ❌ Action needed
❌AzureCLI-BreakingChangeTest
Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:
Related command
az aks nodepool addaz aks nodepool updateDescription
Adds
--enable-managed-dranetto AKS node pool create and update commands. When specified, the command sendsnetworkProfile.dranet.mode=Managed; when omitted during update, the existing DRANET profile is preserved.The change upgrades
azure-mgmt-containerservicefrom41.5.0to41.6.0, which uses the stable2026-06-01API and contains the released DRANET AgentPool models. Preview support can ship earlier through Azure/azure-cli-extensions#10266, while this PR follows the core CLI release train.Testing Guide
Validated with:
azdev style acsazdev linter acs --min-severity mediumazdev test azure-cli-acs -a -k managed_dranetHistory Notes
[AKS]
az aks nodepool add/update: Add--enable-managed-dranetto enable Managed DRANET on a node pool.