Skip to content

aks-preview: Change NAT gateway V2 outbound IPs/prefixes to comma-separated#9760

Open
christine33-creator wants to merge 1 commit intoAzure:mainfrom
christine33-creator:cdossa/fix-natgwv2-comma-separated
Open

aks-preview: Change NAT gateway V2 outbound IPs/prefixes to comma-separated#9760
christine33-creator wants to merge 1 commit intoAzure:mainfrom
christine33-creator:cdossa/fix-natgwv2-comma-separated

Conversation

@christine33-creator
Copy link
Copy Markdown
Contributor

Change --nat-gateway-outbound-ips and --nat-gateway-outbound-ip-prefixes from space-separated (nargs='+') to comma-separated string input, matching the existing load balancer outbound IP parameter pattern (--load-balancer-outbound-ips).

Before: az aks create --nat-gateway-outbound-ips id1 id2
After: az aks create --nat-gateway-outbound-ips id1,id2


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 wheel==0.30.0 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.

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Apr 6, 2026

⚠️Azure CLI Extensions Breaking Change Test
⚠️aks-preview
rule cmd_name rule_message suggest_message
⚠️ 1009 - ParaPropRemove aks create cmd aks create update parameter nat_gateway_outbound_ip_ids: removed property nargs=+
⚠️ 1009 - ParaPropRemove aks create cmd aks create update parameter nat_gateway_outbound_ip_prefix_ids: removed property nargs=+
⚠️ 1009 - ParaPropRemove aks update cmd aks update update parameter nat_gateway_outbound_ip_ids: removed property nargs=+
⚠️ 1009 - ParaPropRemove aks update cmd aks update update parameter nat_gateway_outbound_ip_prefix_ids: removed property nargs=+

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @christine33-creator,
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 setup.py as well.

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Apr 6, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

CodeGen Tools Feedback Collection

Thank 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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

Hi @christine33-creator

⚠️ Release Requirements

Module: aks-preview

  • ⚠️ Please update VERSION to be 19.0.0b30 in src/aks-preview/setup.py

Notes

@christine33-creator christine33-creator force-pushed the cdossa/fix-natgwv2-comma-separated branch from 8698a25 to b1ad63b Compare April 6, 2026 17:19
@christine33-creator christine33-creator marked this pull request as ready for review April 6, 2026 17:42
Copilot AI review requested due to automatic review settings April 6, 2026 17:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 updates the aks-preview extension’s NAT Gateway V2 CLI parameters to accept comma-separated outbound public IP / IP prefix resource IDs (aligning with the existing load balancer outbound IP parameter pattern).

Changes:

  • Change --nat-gateway-outbound-ips / --nat-gateway-outbound-ip-prefixes from nargs='+' (space-separated) to a single comma-separated string argument.
  • Update NAT gateway profile construction to split comma-separated strings into lists.
  • Bump extension version and update changelog; adjust unit tests for the new input type.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/aks-preview/setup.py Bumps extension version to 19.0.0b30.
src/aks-preview/HISTORY.rst Adds 19.0.0b30 release notes entry for the CLI parameter format change.
src/aks-preview/azext_aks_preview/tests/latest/test_natgateway.py Updates unit tests to pass string values for outbound IP / prefix IDs.
src/aks-preview/azext_aks_preview/_params.py Updates CLI argument definitions and help text to indicate comma-separated input.
src/aks-preview/azext_aks_preview/_natgateway.py Parses comma-separated strings into lists when building NAT gateway profiles.

@christine33-creator christine33-creator force-pushed the cdossa/fix-natgwv2-comma-separated branch from c2321f7 to a2de17e Compare April 6, 2026 17:52
* Fix monitoring addon key casing compatibility with azure-cli/acs
* `az aks create/update`: Add `--outbound-type managedNATGatewayV2` support using Azure NAT Gateway Standard V2 SKU with IPv6, user-provided IPs, and IP prefixes.
* `az aks create/update`: Fix `--outbound-type managedNATGatewayV2` being silently overwritten to `loadBalancer` by the dynamic completion logic.
* `az aks create/update`: Change `--nat-gateway-outbound-ips` and `--nat-gateway-outbound-ip-prefixes` to use comma-separated values, consistent with load balancer outbound IP parameters.
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.

duplicated with what's written under 19.0.0b30?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed, thank you.

Pending
+++++++

19.0.0b30
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.

The current change is a breaking change. Please update the major version (to 20.0.0b1) and leave a note with [Breaking Change] as prefix.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done, updated the version and left a note with Breaking Change as prefix.

…arated

Change --nat-gateway-outbound-ips and --nat-gateway-outbound-ip-prefixes
from space-separated (nargs='+') to comma-separated string input, matching
the existing load balancer outbound IP parameter pattern
(--load-balancer-outbound-ips).

Before: az aks create --nat-gateway-outbound-ips id1 id2
After:  az aks create --nat-gateway-outbound-ips id1,id2
@christine33-creator christine33-creator force-pushed the cdossa/fix-natgwv2-comma-separated branch from a2de17e to 25d066e Compare April 7, 2026 04:17
@github-actions github-actions bot added the release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. label Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AKS Auto-Assign Auto assign by bot release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants