Skip to content

{AKS} az aks create: add --enable-quick-attach-detach - #10501

Closed
Jenniferyingni wants to merge 1 commit into
Azure:mainfrom
Jenniferyingni:aks/enable-quick-attach-detach
Closed

Jenniferyingni wants to merge 1 commit into
Azure:mainfrom
Jenniferyingni:aks/enable-quick-attach-detach

Conversation

@Jenniferyingni

@Jenniferyingni Jenniferyingni commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

API version 2026-08-02-preview adds storageProfile.diskCSIDriver.quickAttachDetach.enabled, which turns on Quick Attach Detach (QAD) for the AzureDisk CSI driver (aka.ms/aks/qad). #10491 bumped the vendored SDK to that version; this PR exposes the property on az aks create.

  • New preview flag --enable-quick-attach-detach on az aks create.
  • When set, the create request carries
    "storageProfile": {"diskCSIDriver": {"enabled": true, "quickAttachDetach": {"enabled": true}}}
    diskCSIDriver.enabled is set to true as well, because QAD requires the disk driver, so --enable-disk-driver is not needed alongside it.
  • Combining it with --disable-disk-driver raises MutuallyExclusiveArgumentError.
  • The other prerequisites (Kubernetes >= 1.37.0, OIDC issuer, no Windows node pools) are validated by the RP, which returns a specific error for each; they are listed in the help text.
  • az aks update is intentionally unchanged.

Testing

  • Added unit tests in test_managed_cluster_decorator.py (test_get_disk_driver, test_get_enable_quick_attach_detach); the full module passes (438 tests).
  • Ran the command from source against a live subscription with --debug. The PUT used api-version=2026-08-02-preview with the body above, and the RP's QAD validator responded (InvalidClusterVersion: Quick Attach/Detach requires k8s version >= 1.37.0 when run with -k 1.34), confirming the property is serialized and honored.

🤖 Generated with Claude Code


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

Related command

az aks create --enable-quick-attach-detach

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required) — not run, azdev unavailable in this environment; relying on CI
  • Have you run python scripts/ci/test_index.py -q locally? (pip install azdev required)
  • My extension version conforms to the Extension version schema — change is recorded under the Pending section per the HISTORY.rst guidance, so no version bump

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.

Copilot AI balanced review requested due to automatic review settings October 21, 2026 22:57
@azure-pipelines

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

@yonzhan

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

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

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.

🟢 Approval recommended

The focused changes match the create-only scope, include targeted regression coverage, and have no identified blocking defects.

No open issues 🎉

What changed in this PR

Adds preview support for az aks create --enable-quick-attach-detach, exposing the AzureDisk CSI capability available in the SDK introduced by #10491. az aks update remains unchanged.

Changes:

  • Enables Quick Attach Detach and the disk driver together, rejecting use with --disable-disk-driver.
  • Documents prerequisites, which remain validated by the service.
  • Adds unit coverage, release notes, and a flag-length linter exclusion.
File Description
src/​aks-preview/​linter_exclusions.yml Exempts the new flag from the option-length rule.
src/​aks-preview/​HISTORY.rst Records the new create option.
src/​aks-preview/​azext_aks_preview/​tests/​latest/​test_managed_cluster_decorator.py Tests defaults, enablement, and conflicting flags.
src/​aks-preview/​azext_aks_preview/​managed_cluster_decorator.py Validates the flag and constructs the nested storage profile.
src/​aks-preview/​azext_aks_preview/​custom.py Adds the create-command parameter.
src/​aks-preview/​azext_aks_preview/​_params.py Registers the preview flag.
src/​aks-preview/​azext_aks_preview/​_help.py Documents the feature and prerequisites.

Review effort: Balanced

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

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

@x-engineering-agent

Copy link
Copy Markdown

Hi Jenniferyingni,
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 pyproject.toml (or setup.py, if the extension has not migrated yet) as well.

API version 2026-08-02-preview adds
storageProfile.diskCSIDriver.quickAttachDetach.enabled, which turns on
Quick Attach Detach for the AzureDisk CSI driver. The SDK bump in Azure#10491
picked up the model; this exposes it on create.

--enable-quick-attach-detach (preview) sets the nested property and also
sets diskCSIDriver.enabled=true, since QAD requires the disk driver. It is
rejected client-side together with --disable-disk-driver. Kubernetes
version, OIDC issuer and Windows pool requirements are left to the RP,
which returns specific errors for each.
@Jenniferyingni
Jenniferyingni force-pushed the aks/enable-quick-attach-detach branch from b6563c0 to 2dc5d02 Compare October 21, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants