Skip to content

[AKS] az aks create/update: Change --enable-azure-container-storage --disable-azure-container-storage behavior and add --container-storage-version#31966

Merged
zhoxing-ms merged 7 commits intoAzure:devfrom
nearora-msft:nearora/new_changes_for_acstor_v2
Aug 22, 2025
Merged

[AKS] az aks create/update: Change --enable-azure-container-storage --disable-azure-container-storage behavior and add --container-storage-version#31966
zhoxing-ms merged 7 commits intoAzure:devfrom
nearora-msft:nearora/new_changes_for_acstor_v2

Conversation

@nearora-msft
Copy link
Copy Markdown
Contributor

@nearora-msft nearora-msft commented Aug 20, 2025

Related command
az aks create
az aks update

Description
Changes to the "az aks create" command:

  1. --enable-azure-container-storage: When this flag is set, latest version of acstor is installed on the cx cluster.
  2. --container-storage-version: When --container-storage-version is set along with --enable-azure-container-storage, the version specified as value for --container-storage-version will be the acstor version installed.

Changes to the "az aks update command:"

  1. --enable-azure-container-storage: When this flag is set, latest version of acstor is installed on the cx cluster.
  2. --container-storage-version: When this param is set along with --enable-azure-container-storage, the version specified as value for --container-storage-version will be the acstor version installed.
  3. --disable-azure-container-storage: When this flag is set, whichever version of acstor is installed would be uninstalled from the cx cluster.

Testing Guide

  1. Create AKS cluster with the latest version of acstor.
    az aks create -g test-rg -n test-cluster --enable-azure-container-storage

  2. Create AKS cluster with version 1 of acstor installed with azureDisk as storagepool type.
    az aks create -g test-rg -n test-cluster --enable-azure-container-storage azureDisk --container-storage-version 1

  3. Update AKS cluster with the latest version of acstor.
    az aks update -g test-rg -n test-cluster --enable-azure-container-storage

  4. Update AKS cluster with version 1 of acstor installed with azureDisk as storagepool type.
    az aks update -g test-rg -n test-cluster --enable-azure-container-storage azureDisk --container-storage-version 1

  5. Update AKS cluster and uninstall version of acstor when latest version is installed.
    az aks update -g test-rg -n test-cluster --disable-azure-container-storage

  6. Update AKS cluster and uninstall acstor when v1 version is installed and azureDisk storagepool type is given.
    az aks update -g test-rg -n test-cluster --disable-azure-container-storage azureDisk

  7. Update AKS cluster and uninstall acstor when v1 version is installed when "all" storagepool type is given.
    az aks update -g test-rg -n test-cluster --disable-azure-container-storage all

History Notes

[AKS] az aks create/update: Support installing latest version of acstor on the cx cluster by --enable-azure-container-storage parameter
[AKS] az aks create/update: Support specifying installation version of acstor by --container-storage-version when setting --enable-azure-container-storage
[AKS] az aks update: Support uninstalling acstor from the cx cluster by --disable-azure-container-storage regardless of the installed version


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

Copilot AI review requested due to automatic review settings August 20, 2025 03:25
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Aug 20, 2025

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

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

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

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

azure-client-tools-bot-prd bot commented Aug 20, 2025

⚠️AzureCLI-BreakingChangeTest
⚠️acs
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd aks create cmd aks create added parameter container_storage_version
⚠️ 1008 - ParaPropAdd aks create cmd aks create update parameter enable_azure_container_storage: added property nargs=?
⚠️ 1009 - ParaPropRemove aks create cmd aks create update parameter enable_azure_container_storage: removed property choices=['azureDisk', 'elasticSan', 'ephemeralDisk']
⚠️ 1006 - ParaAdd aks update cmd aks update added parameter container_storage_version
⚠️ 1008 - ParaPropAdd aks update cmd aks update update parameter disable_azure_container_storage: added property nargs=?
⚠️ 1009 - ParaPropRemove aks update cmd aks update update parameter disable_azure_container_storage: removed property choices=['all', 'azureDisk', 'elasticSan', 'ephemeralDisk']
⚠️ 1008 - ParaPropAdd aks update cmd aks update update parameter enable_azure_container_storage: added property nargs=?
⚠️ 1009 - ParaPropRemove aks update cmd aks update update parameter enable_azure_container_storage: removed property choices=['azureDisk', 'elasticSan', 'ephemeralDisk']

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Aug 20, 2025

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

@github-actions
Copy link
Copy Markdown

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>

@FumingZhang
Copy link
Copy Markdown
Member

/azp run

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 CLI commands to support both version 1 and the latest version of Azure Container Storage, providing backward compatibility while introducing new functionality. The changes modify the behavior of --enable-azure-container-storage and --disable-azure-container-storage flags and add a new --container-storage-version parameter.

  • Adds support for installing the latest version of Azure Container Storage by default when using --enable-azure-container-storage without additional parameters
  • Introduces --container-storage-version parameter to specify version 1 explicitly when needed
  • Updates validation logic to handle both v1 and v2 extension installations with appropriate error messaging

Reviewed Changes

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

Show a summary per file
File Description
test_validators.py Renames existing test classes and methods to v1-specific variants and adds new test cases for v2 validation
test_aks_commands.py Updates test method names to reflect v1 specificity and adds new integration tests for v2 functionality
managed_cluster_decorator.py Implements version detection logic and routes to appropriate v1 or v2 installation/validation functions
custom.py Adds container_storage_version parameter to both aks_create and aks_update function signatures
acstor_ops.py Renames v1 functions and adds new v2 enable/disable operations with simplified configuration
_validators.py Splits validation into v1 and v2 specific functions with appropriate error handling for version conflicts
_helpers.py Updates constant references for v1 and adds new helper function for checking extension installation status
_consts.py Adds new constants for v2 extension while maintaining v1 constants for backward compatibility
_params.py Implements custom argument types allowing flags to work with or without values
parameters.py Minor formatting cleanup
linter_exclusions.yml Adds exclusions for the new container_storage_version parameter

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@FumingZhang
Copy link
Copy Markdown
Member

Please fix failed CI checks

@nearora-msft nearora-msft changed the title [AKS] az aks create/update: Change --enable-azure-container-storage --disable-azure-container-storage behavior and add --container-storage-version [AKS] 'az aks create/update': Change --enable-azure-container-storage --disable-azure-container-storage behavior and add --container-storage-version Aug 20, 2025
@nearora-msft nearora-msft changed the title [AKS] 'az aks create/update': Change --enable-azure-container-storage --disable-azure-container-storage behavior and add --container-storage-version [AKS] az aks create/update': Change '--enable-azure-container-storage --disable-azure-container-storage behavior and add --container-storage-version Aug 20, 2025
@nearora-msft nearora-msft changed the title [AKS] az aks create/update': Change '--enable-azure-container-storage --disable-azure-container-storage behavior and add --container-storage-version [AKS] az aks create/update: Change --enable-azure-container-storage --disable-azure-container-storage behavior and add --container-storage-version Aug 20, 2025
…--disable-azure-container-storage behavior and add --container-storage-version
@nearora-msft nearora-msft force-pushed the nearora/new_changes_for_acstor_v2 branch from 115efef to 49b2786 Compare August 20, 2025 17:57
@nearora-msft nearora-msft force-pushed the nearora/new_changes_for_acstor_v2 branch from 49b2786 to 8ace4f6 Compare August 20, 2025 18:00
@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Copy Markdown
Member

@FumingZhang FumingZhang left a comment

Choose a reason for hiding this comment

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

lgtm

Queued live test to validate the change, test passed!

  • test_aks_create_with_azurecontainerstorage_v1
  • test_aks_create_with_azurecontainerstorage_v1_with_ephemeral_disk_parameters
  • test_aks_update_with_azurecontainerstorage_v1
  • test_aks_update_with_azurecontainerstorage_v1_with_ephemeral_disk_parameters
  • test_aks_create_with_azurecontainerstorage
  • test_aks_update_with_azurecontainerstorage

@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

FumingZhang
FumingZhang previously approved these changes Aug 22, 2025
@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@yanzhudd
Copy link
Copy Markdown
Contributor

I’ve refactored the history notes to include more detailed changes:

image

Does it look good to you?

@nearora-msft
Copy link
Copy Markdown
Contributor Author

I’ve refactored the history notes to include more detailed changes:

image Does it look good to you?

Looks good to me, thanks

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

Labels

AKS az aks/acs/openshift Auto-Assign Auto assign by bot Storage az storage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants