azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

[AKS] `az aks create` and `az aks nodepool add`: Add `--pod-ip-allocation-mode` to the agentpool profile in AKS for Azure CNI Static Block GA feature support

Open nairashu opened this issue 7 months ago • 29 comments

[AKS] az aks create and az aks nodepool add: Add --pod-ip-allocation-mode to the agentpool profile in AKS for Azure CNI Static Block GA feature support

Related command az aks create az aks nodepool add

Description Add Azure CNI Static Block related change from preview. Adding flags & validation to below commands

az aks create az aks nodepool add Azure CLI extension PR: https://github.com/Azure/azure-cli-extensions/pull/7288

This property is added to the network profile of an Agentpool in AKS to describe the type of IPAM when using Azure CNI.

Testing Guide az aks create <CLUSTER_NAME> --network-plugin azure --vnet-subnet-id <NODE_SUBNET_ID> --pod-subnet-id <POD_SUBNET_ID> --pod-ip-allocation-mode <"DynamicIndividual or StaticBlock"> --max-pods 80

az aks nodepool add <NODEPOOL_NAME> --pod-subnet-id <POD_SUBNET_ID> --pod-ip-allocation-mode <"DynamicIndividual or StaticBlock"> --max-pods 80

Example:

az aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
               --kubernetes-version $(K8S_VER) \
               --node-count $(NODE_COUNT) \
               --node-vm-size $(VM_SIZE) \
               --network-plugin azure \
               --network-dataplane cilium \
               --vnet-subnet-id /subscriptions/$(SUB)/resourceGroups/$(GROUP)/providers/Microsoft.Network/virtualNetworks/$(VNET)/subnets/nodenet \
               --pod-subnet-id /subscriptions/$(SUB)/resourceGroups/$(GROUP)/providers/Microsoft.Network/virtualNetworks/$(VNET)/subnets/podnet \
               --pod-ip-allocation-mode $(POD_IP_ALLOCATION_MODE) \
               --max-pods 80

History Notes [AKS] az aks create: Add --pod-ip-allocation-mode parameter to support Azure CNI Static Block Allocation [AKS] az aks nodepool add: Add --pod-ip-allocation-mode parameter to support Azure CNI Static Block Allocation

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change [Component Name 2] az command b: Add some customer-facing feature


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

nairashu avatar May 23 '25 05:05 nairashu

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.9
️✔️acs
️✔️latest
️✔️3.12
️✔️3.9
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.9
️✔️ams
️✔️latest
️✔️3.12
️✔️3.9
️✔️apim
️✔️latest
️✔️3.12
️✔️3.9
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.9
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.9
️✔️aro
️✔️latest
️✔️3.12
️✔️3.9
️✔️backup
️✔️latest
️✔️3.12
️✔️3.9
️✔️batch
️✔️latest
️✔️3.12
️✔️3.9
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.9
️✔️billing
️✔️latest
️✔️3.12
️✔️3.9
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.9
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.9
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.9
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.9
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.9
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.9
️✔️config
️✔️latest
️✔️3.12
️✔️3.9
️✔️configure
️✔️latest
️✔️3.12
️✔️3.9
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.9
️✔️container
️✔️latest
️✔️3.12
️✔️3.9
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.9
️✔️core
️✔️latest
️✔️3.12
️✔️3.9
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.9
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.9
️✔️dls
️✔️latest
️✔️3.12
️✔️3.9
️✔️dms
️✔️latest
️✔️3.12
️✔️3.9
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.9
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.9
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.9
️✔️find
️✔️latest
️✔️3.12
️✔️3.9
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.9
️✔️identity
️✔️latest
️✔️3.12
️✔️3.9
️✔️iot
️✔️latest
️✔️3.12
️✔️3.9
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.9
️✔️lab
️✔️latest
️✔️3.12
️✔️3.9
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.9
️✔️maps
️✔️latest
️✔️3.12
️✔️3.9
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.9
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.9
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.9
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.9
️✔️network
️✔️latest
️✔️3.12
️✔️3.9
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.9
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.9
️✔️profile
️✔️latest
️✔️3.12
️✔️3.9
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.9
️✔️redis
️✔️latest
️✔️3.12
️✔️3.9
️✔️relay
️✔️latest
️✔️3.12
️✔️3.9
️✔️resource
️✔️latest
️✔️3.12
️✔️3.9
️✔️role
️✔️latest
️✔️3.12
️✔️3.9
️✔️search
️✔️latest
️✔️3.12
️✔️3.9
️✔️security
️✔️latest
️✔️3.12
️✔️3.9
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.9
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.9
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.9
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.9
️✔️sql
️✔️latest
️✔️3.12
️✔️3.9
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.9
️✔️storage
️✔️latest
️✔️3.12
️✔️3.9
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.9
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.9
️✔️util
️✔️latest
️✔️3.12
️✔️3.9
️✔️vm
️✔️latest
️✔️3.12
️✔️3.9

Hi @nairashu, Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

❌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 create cmd aks create added parameter pod_ip_allocation_mode
⚠️ 1006 - ParaAdd aks nodepool add cmd aks nodepool add added parameter pod_ip_allocation_mode

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

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

yonzhan avatar May 23 '25 05:05 yonzhan

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[bot] avatar May 23 '25 05:05 github-actions[bot]

/azp run

FumingZhang avatar May 23 '25 05:05 FumingZhang

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar May 23 '25 05:05 azure-pipelines[bot]

depends on 2025-04-01 API version, updated milestone to https://github.com/Azure/azure-cli/milestone/157

FumingZhang avatar May 23 '25 06:05 FumingZhang

/azp run

nairashu avatar Jun 03 '25 00:06 nairashu

Commenter does not have sufficient privileges for PR 31544 in repo Azure/azure-cli

azure-pipelines[bot] avatar Jun 03 '25 00:06 azure-pipelines[bot]

/azp run

yonzhan avatar Jun 03 '25 01:06 yonzhan

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Jun 03 '25 01:06 azure-pipelines[bot]

/azp run

FumingZhang avatar Jun 03 '25 04:06 FumingZhang

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Jun 03 '25 04:06 azure-pipelines[bot]

/azp run

nairashu avatar Jun 10 '25 18:06 nairashu

Commenter does not have sufficient privileges for PR 31544 in repo Azure/azure-cli

azure-pipelines[bot] avatar Jun 10 '25 18:06 azure-pipelines[bot]

/azp run

yonzhan avatar Jun 10 '25 23:06 yonzhan

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Jun 10 '25 23:06 azure-pipelines[bot]

/azp run

FumingZhang avatar Jun 11 '25 00:06 FumingZhang

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Jun 11 '25 00:06 azure-pipelines[bot]

please fix failed CI checks

          self.agentpool.pod_ip_allocation_mode is not None
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        ):

E AttributeError: 'ManagedClusterAgentPoolProfile' object has no attribute 'pod_ip_allocation_mode'

https://dev.azure.com/azclitools/public/_build/results?buildId=250244&view=logs&j=950e443e-fa90-5f50-4303-cd9168964025&t=e8e1e5d0-e808-59fd-7db9-daddfd146787&l=4242

FumingZhang avatar Jun 11 '25 03:06 FumingZhang

/azp run

FumingZhang avatar Jun 11 '25 04:06 FumingZhang

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Jun 11 '25 04:06 azure-pipelines[bot]

/azp run

FumingZhang avatar Jun 11 '25 04:06 FumingZhang

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Jun 11 '25 04:06 azure-pipelines[bot]

👍

cceneag avatar Jun 17 '25 11:06 cceneag

👍

cceneag avatar Jun 17 '25 11:06 cceneag

/azp run

FumingZhang avatar Jun 18 '25 01:06 FumingZhang

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Jun 18 '25 01:06 azure-pipelines[bot]

/azp run

FumingZhang avatar Jun 23 '25 01:06 FumingZhang