Repository navigation
Update Azure.AKS.Version to accept clusters on the AKS Long Term Support plan - #3989
Open
Ming (MaxonT) wants to merge 1 commit into
Open
Ming (MaxonT) wants to merge 1 commit into
Ming (MaxonT) wants to merge 1 commit into
Conversation
…ort plan Signed-off-by: Ym <173550318+MaxonT@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.Versioncurrently fails a cluster whosekubernetesVersionis belowAZURE_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 whensku.tierisPremiumandproperties.supportPlanisAKSLongTermSupport. Other clusters are evaluated as before, including Premium clusters on theKubernetesOfficialplan 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
Resources.AKS.LTS.json(5 clusters: Premium with LTS at 1.27.9, Premium withKubernetesOfficialat 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 newAzure.AKS.Version/Long Term SupportPester 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).dotnet publishand ran this test with Pester 5.7.1 on PowerShell 7.7.0 against PSRule 2.9.0.Not run
Azure.AKS.Tests.ps1: with my local build (.NET 9 SDK rolled forward, sinceglobal.jsonasks for 8.0, and no Bicep type index generated) the existing contexts fail inBeforeAllwith "Unable to find 'types_index.min.json.deflated' in manifest", so I could not compare them against the base.Microsoft.ContainerService/managedClusters/agentPoolsresources are still checked against the minimum version on their own, because the cluster's SKU and support plan are not part of that object.PR Checklist