Skip to content

Update Azure.AKS.Version to accept clusters on the AKS Long Term Support plan - #3989

Open
Ming (MaxonT) wants to merge 1 commit into
Azure:mainfrom
MaxonT:contrib/2443-auto
Open

Ming (MaxonT) wants to merge 1 commit into
Azure:mainfrom
MaxonT:contrib/2443-auto

Conversation

@MaxonT

Copy link
Copy Markdown

A 1.27 cluster that is deliberately on AKS Long Term Support fails Azure.AKS.Version against the 1.33.7 minimum, so this lets Premium plus AKSLongTermSupport pass; the version list behind LTS is not checked, so I would like your view on that.

PR Summary

Azure.AKS.Version currently fails a cluster whose kubernetesVersion is below AZURE_AKS_CLUSTER_MINIMUM_VERSION (1.33.7 today), including a 1.27 cluster that is intentionally on Long Term Support. This change passes a managed cluster when sku.tier is Premium and properties.supportPlan is AKSLongTermSupport. Other clusters are evaluated as before, including Premium clusters on the KubernetesOfficial plan and Standard clusters that set the LTS plan.

The rule documentation notes the new behavior, and the change log has an entry under Unreleased.

Fixes #2443

Tests

  • Added Resources.AKS.LTS.json (5 clusters: Premium with LTS at 1.27.9, Premium with KubernetesOfficial at 1.27.9, Standard with LTS at 1.27.9, Premium with no plan at 1.27.9, Premium with LTS at 1.33.7) and a new Azure.AKS.Version / Long Term Support Pester test that runs only that rule. With the change it passes, and with the old rule file the same test fails (4 failures instead of the expected 3).
  • I built the module locally with dotnet publish and ran this test with Pester 5.7.1 on PowerShell 7.7.0 against PSRule 2.9.0.

Not run

  • The rest of Azure.AKS.Tests.ps1: with my local build (.NET 9 SDK rolled forward, since global.json asks for 8.0, and no Bicep type index generated) the existing contexts fail in BeforeAll with "Unable to find 'types_index.min.json.deflated' in manifest", so I could not compare them against the base.
  • The .NET unit tests and the docs build.
  • The agent pool branch of the rule is unchanged: Microsoft.ContainerService/managedClusters/agentPools resources are still checked against the minimum version on their own, because the cluster's SKU and support plan are not part of that object.
  • I did not check which Kubernetes versions AKS accepts for the LTS plan, so the rule trusts the plan setting and does not compare the version against a list of LTS releases.

PR Checklist

  • PR has a meaningful title
  • Summarized changes
  • Change is not breaking
  • This PR is ready to merge and is not Work in Progress
  • Rule changes
    • Unit tests created/ updated
    • Rule documentation created/ updated
    • Link to a filed issue
    • Change log has been updated with change under unreleased section

…ort plan

Signed-off-by: Ym <173550318+MaxonT@users.noreply.github.com>
@MaxonT
Ming (MaxonT) requested a review from a team as a code owner November 27, 2026 04:02

This branch has not been deployed

No deployments
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.

Update Azure.AKS.Version to detect when AKS LTS is used

1 participant