Skip to content

{aks-preview} Add --node-public-ip-prefix-ids to az aks nodepool update - #10420

Open
Christine DOSSA (christine33-creator) wants to merge 3 commits into
Azure:mainfrom
christine33-creator:cdossa/aks-nodepool-update-node-public-ip-prefix-ids
Open

Christine DOSSA (christine33-creator) wants to merge 3 commits into
Azure:mainfrom
christine33-creator:cdossa/aks-nodepool-update-node-public-ip-prefix-ids

Conversation

@christine33-creator

@christine33-creator Christine DOSSA (christine33-creator) commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Related command

az aks nodepool update --node-public-ip-prefix-ids

Description

Extends the dual-stack node public IP prefix flag (--node-public-ip-prefix-ids / nodePublicIPPrefixIDs) to az aks nodepool update. The flag already ships on az aks create and az aks nodepool add; this adds the in-place add/replace path so an existing node pool's assigned IPv4/IPv6 public IP prefixes can be grown (e.g. add an IPv6 prefix to an IPv4-only pool) or replaced. An accepted change rolls the pool so existing nodes are recreated with the new public IPs.

Preview-gated behind the NodePublicIPv6PrefixPreview feature flag, consistent with create / nodepool add.

Changes

  • _params.py — register --node-public-ip-prefix-ids on aks nodepool update (reuses validate_node_public_ip_prefix_ids).
  • agentpool_decorator.py — AKSPreviewAgentPoolUpdateDecorator.update_network_profile applies node_public_ip_prefix_i_ds (the existing context getter already works in UPDATE mode).
  • custom.py — thread the parameter through aks_agentpool_update.
  • _help.py — parameter help + example.
  • HISTORY.rst / setup.py — bump aks-preview to 22.0.0b10.

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

  • The PR title and description convey what is being changed.
  • HISTORY.rst updated and the extension version bumped.
  • Tests (azdev test aks-preview) run locally.

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.

Copilot review overview

🟡 Changes recommended

Legacy singular prefix state must be cleared, and the new update behavior needs dedicated tests.

Review effort: Balanced
Findings: 1 High severity · 1 Low severity

Open (2)
What changed in this PR

Adds in-place node public IP prefix updates for AKS node pools.

Changes:

  • Registers and applies --node-public-ip-prefix-ids.
  • Adds command help and an update example.
  • Bumps the extension version and history.
File Description
setup.py Bumps version to 22.0.0b10.
HISTORY.rst Documents the feature.
custom.py Threads the new parameter into updates.
agentpool_decorator.py Applies prefix IDs to the network profile.
_params.py Registers the update argument and validator.
_help.py Adds help and an example.

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

Comment thread src/aks-preview/azext_aks_preview/agentpool_decorator.py
Comment thread src/aks-preview/azext_aks_preview/agentpool_decorator.py
@christine33-creator

Copy link
Copy Markdown
Contributor Author

Pushed d83a517 addressing the review feedback and the failing azdev linter:

  • Legacy singular field (mutual-exclusion bug): update_network_profile now clears agentpool.node_public_ip_prefix_id when it sets the plural array, so an IPv4-only pool created with the legacy --node-public-ip-prefix-id can migrate to dual-stack without the PUT being rejected for sending both fields.
  • Update-path unit tests: added common_update_node_public_ip_prefix_ids (wired into the Standalone update test case) covering (1) creating a missing network profile and clearing the legacy singular field on migration, (2) replacing prefixes on a pool that already carries the array, (3) no-op (network profile untouched) when no prefixes are passed.
  • azdev linter: added aks nodepool update to linter_exclusions.yml for option_length_too_long (the --node-public-ip-prefix-ids option name is identical to the already-shipped aks create / aks nodepool add flags) and require_wait_command_if_no_wait (mirrors the existing aks nodepool group exclusion), which were the two linter failures.

@christine33-creator

Copy link
Copy Markdown
Contributor Author

Pushed 317a49a fixing the remaining option_length_too_long linter error.

Root cause: the prior commit added a second aks nodepool update: top-level key to linter_exclusions.yml. YAML duplicate keys resolve last-wins, so the pre-existing aks nodepool update: block further down the file silently overrode the new one and dropped the node_public_ip_prefix_ids exclusion — which is why the HIGH-severity option_length_too_long kept failing.

Fix: merged node_public_ip_prefix_ids -> option_length_too_long into the existing aks nodepool update: block (now a single key) and removed the redundant require_wait_command_if_no_wait entry — that rule is already covered by the aks nodepool command-group exclusion, which is why aks nodepool update never appeared in the require_wait failures.

@yonzhan

Copy link
Copy Markdown
Collaborator

aks-preview

@yonzhan Yong Zhang (yonzhan) added this to the Backlog milestone Oct 2, 2026
@christine33-creator
Christine DOSSA (christine33-creator) marked this pull request as ready for review October 2, 2026 04:13

@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 rebase your branch onto main to pick up the latest commits and work around the current CI check issue. Christine DOSSA (@christine33-creator)

@christine33-creator
Christine DOSSA (christine33-creator) force-pushed the cdossa/aks-nodepool-update-node-public-ip-prefix-ids branch from 317a49a to 5306ca3 Compare October 5, 2026 05:17
@christine33-creator

Christine DOSSA (christine33-creator) commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks FumingZhang! Rebased onto the latest main. After the rebase the diff is only the 8 src/aks-preview/* files this PR actually touches, so that should clear. CI is re-running.

FumingZhang
FumingZhang previously approved these changes Oct 5, 2026
@necusjz

Copy link
Copy Markdown
Member

Copilot resolve the merge conflicts in this pull request

Adds the in-place add/replace path for dual-stack node public IP prefixes on an
existing node pool. An accepted change rolls the pool so existing nodes are
recreated with the new public IPs. Bumps aks-preview to 22.0.0b10.
…add update-path unit tests; linter exclusions for aks nodepool update
…aks nodepool update' key

The previous commit added a second 'aks nodepool update:' top-level key to
linter_exclusions.yml. YAML duplicate keys resolve last-wins, so the existing
block (further down the file) silently overrode the new one and dropped the
node_public_ip_prefix_ids option_length_too_long exclusion, leaving the HIGH
severity linter failure. Merge the parameter exclusion into the existing key
and drop the redundant require_wait entry (already covered by the 'aks nodepool'
group exclusion).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants