Skip to content

[AKS] az aks nodepool add/update: Add --enable-managed-dranet - #34003

Open
Evan Baker (rbtr) wants to merge 5 commits into
Azure:devfrom
rbtr:rbtr/dranet-stable-cli
Open

[AKS] az aks nodepool add/update: Add --enable-managed-dranet#34003
Evan Baker (rbtr) wants to merge 5 commits into
Azure:devfrom
rbtr:rbtr/dranet-stable-cli

Conversation

@rbtr

@rbtr Evan Baker (rbtr) commented Aug 27, 2026

Copy link
Copy Markdown

🤖 PR Validation — ❌ Action needed

Breaking Changes Tests
❌ 1 ️✔️ 130/130
❌AzureCLI-BreakingChangeTest
❌acs
rule cmd_name rule_message suggest_message
1010 - ParaPropUpdate aks nodepool add cmd aks nodepool 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 nodepool add
⚠️ 1006 - ParaAdd aks nodepool add cmd aks nodepool add added parameter enable_managed_dranet
⚠️ 1006 - ParaAdd aks nodepool update cmd aks nodepool update added parameter enable_managed_dranet

Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:

  • Breaking changes can only be merged during the designated breaking change window
  • A pre-announcement must be released at least one month in advance

For more details on how to introduce breaking changes, refer to the documentation: azure-cli/doc/how_to_introduce_breaking_changes.md

Related command

az aks nodepool add
az aks nodepool update

Description

Adds --enable-managed-dranet to AKS node pool create and update commands. When specified, the command sends networkProfile.dranet.mode=Managed; when omitted during update, the existing DRANET profile is preserved.

The change upgrades azure-mgmt-containerservice from 41.5.0 to 41.6.0, which uses the stable 2026-06-01 API 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

az aks nodepool add -g <resource-group> --cluster-name <cluster> -n <nodepool> --enable-managed-dranet
az aks nodepool update -g <resource-group> --cluster-name <cluster> -n <nodepool> --enable-managed-dranet

Validated with:

  • azdev style acs
  • azdev linter acs --min-severity medium
  • azdev test azure-cli-acs -a -k managed_dranet

History Notes

[AKS] az aks nodepool add/update: Add --enable-managed-dranet to enable Managed DRANET on a node pool.


  • The PR title and description follow the submitting pull request guidelines.
  • The change follows the command and error handling guidelines.

Copilot AI lite review requested due to automatic review settings August 27, 2026 17:55
@rbtr
Evan Baker (rbtr) requested review from a team and FumingZhang as code owners August 27, 2026 17:55
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@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 27, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Thank you for your contribution Evan Baker (@rbtr)! We will review the pull request and get back to you soon.

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

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-dranet to nodepool add/update args, help, and the agentpool decorator logic to set networkProfile.dranet.mode=Managed.
  • Upgrade azure-mgmt-containerservice from 41.5.0 to 41.6.0 across 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

Comment on lines +1789 to +1791
def get_enable_managed_dranet(self) -> bool:
"""Obtain the value of enable_managed_dranet."""
return self.raw_param.get("enable_managed_dranet")
Comment thread src/azure-cli/HISTORY.rst Outdated

**AKS**

* `az aks nodepool add/update`: Add `--enable-managed-dranet` to enable Managed DRANET on a node pool.
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
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:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

consider apply is None check for asg_ids and allowed_host_ports

Comment thread src/azure-cli/setup.py
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@FumingZhang

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@FumingZhang FumingZhang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

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

Labels

act-observability-squad AKS az aks/acs/openshift Auto-Assign Auto assign by bot 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