Switch default Windows image to windows-2022#6282
Merged
Merged
Conversation
2c9af12 to
ca71a36
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6282 +/- ##
=======================================
Coverage 43.95% 43.95%
=======================================
Files 289 289
Lines 25351 25351
=======================================
Hits 11143 11143
Misses 13435 13435
Partials 773 773 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
/test pull-cluster-api-provider-azure-conformance-with-ci-artifacts |
Contributor
|
LGTM label has been added. DetailsGit tree hash: ce523f30bd4691bc4c79ea1eb5ca0e98041a5a64 |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: willie-yao The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Updates CAPZ's in-tree Windows defaults from
windows-2019towindows-2022. Windows Server 2019 entered extended support in Jan 2024 and we no longer publish 2019 reference images, so any user creating an AzureMachine without explicitly settingwindowsServerVersionwould land on a stale, no-longer-published image.CI scripts (
scripts/ci-e2e.sh,ci-conformance.sh,ci-entrypoint.sh) already exportWINDOWS_SERVER_VERSION="${WINDOWS_SERVER_VERSION:-windows-2022}"and the existing[REQUIRED]HA Windows worker e2e is consistently green at 2022, so the risk profile is low.Changes:
azure/defaults.go:DefaultWindowsGalleryImageNameandDefaultWindowsOsAndVersionflipped to 2022azure/services/virtualmachineimages/images.go: the year-substitution inGetDefaultWindowsImageno longer assumes the default name contains"2019". Switched the brittlestrings.Replace(imageName, "2019", match[1], 1)toregexp.ReplaceAllString(imageName, "\d{4}", match[1]), so any future default-year flip won't require touching this code again.test/e2e/helpers.go: the Windows version-intersection check inresolveKubernetesVersionsnow queriescapi-win-2022-containerd(only runs whenTEST_WINDOWS=true).Intentionally not changed:
oldWindows2019Versionsmap and thewindows-2019-containerd-gen1SKU) — those are hardcoded for k8s ≤ 1.28.12 etc. and reflect what was published to the Azure Marketplace at the time.windows-2019osAndVersion inimages_test.goandmachine_test.go— they now serve as regression coverage for the explicit-override path.Which issue(s) this PR fixes:
Fixes #5357
Special notes for your reviewer:
None.
TODOs:
Release note: