Allow AKS nodepool upgrades from WS2022 to WS2025 - #10255
Conversation
|
Hi Tim Wright (@timmy-wright), |
There was a problem hiding this comment.
Pull request overview
This PR updates the aks-preview extension to allow az aks nodepool update --os-sku to accept Windows Server OS SKU values needed for in-place upgrades from Windows2022 to Windows2025, and documents/tests that support.
Changes:
- Add
Windows2022andWindows2025to the--os-skuenum allow-list foraz aks nodepool update. - Update command help text to reflect Windows OS SKU default behavior (by Kubernetes version).
- Add unit coverage asserting the update allow-list includes both Windows SKUs, and note the change in
HISTORY.rst.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/aks-preview/HISTORY.rst |
Changelog entry describing the new Windows OS SKU options for nodepool update. |
src/aks-preview/azext_aks_preview/tests/latest/test_validators.py |
Adds tests around OS SKU handling / allow-list for nodepool update. |
src/aks-preview/azext_aks_preview/_params.py |
Extends node_os_skus_update to include Windows2022 and Windows2025. |
src/aks-preview/azext_aks_preview/_help.py |
Updates --os-sku help text to mention Windows defaults by Kubernetes version. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (1)
src/aks-preview/azext_aks_preview/_help.py:290
- The updated help text still uses the abbreviation "k8s" and introduces a Kubernetes-version-based default that is inconsistent with the other
--os-skuhelp entry in this file (around theaks nodepool addhelp still says the default is Windows2022). Please spell out "Kubernetes version" here for clarity, and consider aligning the default wording across the two help sections so users don’t get conflicting guidance.
- name: --os-sku
type: string
short-summary: The os-sku of the agent node pool. Ubuntu, Ubuntu2204, Ubuntu2404, Ubuntu2604, CBLMariner, AzureLinux, AzureLinux3, AzureLinuxOSGuard, AzureLinux3OSGuard, AzureContainerLinux, or Flatcar when os-type is Linux, default is Ubuntu if not set; Windows2019, Windows2022, Windows2025, or WindowsAnnual when os-type is Windows, the current default is Windows2022 if k8s version is less than 1.37 or Windows2025 if k8s is 1.37 or greater.
|
aks |
5db0ca2 to
6fcc759
Compare
… update Allows in-place OS SKU upgrades between Windows Server 2022 and 2025 on an existing node pool via `az aks nodepool update --os-sku`. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Clarify that the default Windows os-sku depends on Kubernetes version: Windows2022 for k8s < 1.36, Windows2025 for k8s >= 1.37. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add TestValidateOsSku covering validate_os_sku and the node_os_skus_update choices list for az aks nodepool update. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
`az aks create` and `az aks nodepool add` now always enable --enable-fips-image when --os-sku is Windows2025, since Windows2025 requires a FIPS-enabled OS image. --disable-fips-image cannot be combined with --os-sku Windows2025 and raises an ArgumentUsageError. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
6fcc759 to
4a99ba0
Compare
🤖 PR Validation —⚠️ Review suggested
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az aks nodepool update --os-sku,az aks create --os-sku/--enable-fips-image,az aks nodepool add --os-sku/--enable-fips-imageSummary
Allows upgrading an existing Windows node pool's OS SKU from Windows Server 2022 to Windows Server 2025 in place, and ensures Windows2025 node pools always run a FIPS-enabled OS image.
az aks nodepool update --os-skunow acceptsWindows2022andWindows2025(previously only Linux SKUs were allowed on update), enabling in-place WS2022 → WS2025 upgrades.az aks createandaz aks nodepool add:--enable-fips-imageis now required and always enabled when--os-skuisWindows2025, since Windows2025 requires a FIPS-enabled OS image. Passing--disable-fips-imagetogether with--os-sku Windows2025now raises an error instead of being silently accepted.HISTORY.rstaccordingly.test_validators.pyandtest_agentpool_decorator.py.General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install azdevrequired)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.jsonautomatically.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.