diff --git a/azure/defaults.go b/azure/defaults.go index 02e5508fa5c..48a5a35b13a 100644 --- a/azure/defaults.go +++ b/azure/defaults.go @@ -52,7 +52,7 @@ const ( // DefaultLinuxGalleryImageName is the default Linux community gallery image definition. DefaultLinuxGalleryImageName = "capi-ubun2-2404" // DefaultWindowsGalleryImageName is the default Windows community gallery image definition. - DefaultWindowsGalleryImageName = "capi-win-2019-containerd" + DefaultWindowsGalleryImageName = "capi-win-2022-containerd" ) const ( @@ -72,7 +72,7 @@ const ( const ( // DefaultWindowsOsAndVersion is the default Windows Server version to use when // generating default images for Windows nodes. - DefaultWindowsOsAndVersion = "windows-2019" + DefaultWindowsOsAndVersion = "windows-2022" ) const ( diff --git a/azure/services/virtualmachineimages/images.go b/azure/services/virtualmachineimages/images.go index 3a6fcac29ff..33b5060a036 100644 --- a/azure/services/virtualmachineimages/images.go +++ b/azure/services/virtualmachineimages/images.go @@ -106,7 +106,7 @@ func (s *Service) GetDefaultWindowsImage(ctx context.Context, _, k8sVersion, run if len(match) != 2 { return nil, errors.Errorf("unsupported osAndVersion %s", osAndVersion) } - imageName = strings.Replace(imageName, "2019", match[1], 1) + imageName = strings.Replace(imageName, "2022", match[1], 1) } // Use the Azure Marketplace for specific older versions, to keep "clusterctl upgrade" from rolling new machines. diff --git a/templates/test/ci/cluster-template-prow-ci-version-windows.yaml b/templates/test/ci/cluster-template-prow-ci-version-windows.yaml index 9c1fdc31ea8..dffa59df9c0 100644 --- a/templates/test/ci/cluster-template-prow-ci-version-windows.yaml +++ b/templates/test/ci/cluster-template-prow-ci-version-windows.yaml @@ -472,7 +472,7 @@ spec: marketplace: offer: capi-windows publisher: cncf-upstream - sku: ${WINDOWS_SERVER_VERSION:=windows-2019}-containerd-gen1 + sku: ${WINDOWS_SERVER_VERSION:=windows-2022}-containerd-gen1 version: latest osDisk: diskSizeGB: 128 diff --git a/templates/test/ci/cluster-template-prow-machine-pool-ci-version-windows.yaml b/templates/test/ci/cluster-template-prow-machine-pool-ci-version-windows.yaml index 5d82db90e72..05c3ee5d6a1 100644 --- a/templates/test/ci/cluster-template-prow-machine-pool-ci-version-windows.yaml +++ b/templates/test/ci/cluster-template-prow-machine-pool-ci-version-windows.yaml @@ -481,7 +481,7 @@ spec: marketplace: offer: capi-windows publisher: cncf-upstream - sku: ${WINDOWS_SERVER_VERSION:=windows-2019}-containerd-gen1 + sku: ${WINDOWS_SERVER_VERSION:=windows-2022}-containerd-gen1 version: latest osDisk: diskSizeGB: 128 diff --git a/templates/test/ci/prow-ci-version-windows/patches/machine-deployment-ci-version-windows.yaml b/templates/test/ci/prow-ci-version-windows/patches/machine-deployment-ci-version-windows.yaml index a0e8936019e..68d35e65b76 100644 --- a/templates/test/ci/prow-ci-version-windows/patches/machine-deployment-ci-version-windows.yaml +++ b/templates/test/ci/prow-ci-version-windows/patches/machine-deployment-ci-version-windows.yaml @@ -11,7 +11,7 @@ spec: marketplace: publisher: cncf-upstream offer: capi-windows - sku: ${WINDOWS_SERVER_VERSION:=windows-2019}-containerd-gen1 + sku: ${WINDOWS_SERVER_VERSION:=windows-2022}-containerd-gen1 version: "latest" identity: UserAssigned userAssignedIdentities: diff --git a/templates/test/ci/prow-ci-version/patches/machine-deployment-ci-version-windows.yaml b/templates/test/ci/prow-ci-version/patches/machine-deployment-ci-version-windows.yaml index a0e8936019e..68d35e65b76 100644 --- a/templates/test/ci/prow-ci-version/patches/machine-deployment-ci-version-windows.yaml +++ b/templates/test/ci/prow-ci-version/patches/machine-deployment-ci-version-windows.yaml @@ -11,7 +11,7 @@ spec: marketplace: publisher: cncf-upstream offer: capi-windows - sku: ${WINDOWS_SERVER_VERSION:=windows-2019}-containerd-gen1 + sku: ${WINDOWS_SERVER_VERSION:=windows-2022}-containerd-gen1 version: "latest" identity: UserAssigned userAssignedIdentities: diff --git a/templates/test/ci/prow-machine-pool-ci-version-windows/patches/machine-pool-ci-version-windows.yaml b/templates/test/ci/prow-machine-pool-ci-version-windows/patches/machine-pool-ci-version-windows.yaml index 07beec81a4c..b674abf6f37 100644 --- a/templates/test/ci/prow-machine-pool-ci-version-windows/patches/machine-pool-ci-version-windows.yaml +++ b/templates/test/ci/prow-machine-pool-ci-version-windows/patches/machine-pool-ci-version-windows.yaml @@ -11,7 +11,7 @@ spec: marketplace: publisher: cncf-upstream offer: capi-windows - sku: ${WINDOWS_SERVER_VERSION:=windows-2019}-containerd-gen1 + sku: ${WINDOWS_SERVER_VERSION:=windows-2022}-containerd-gen1 version: latest identity: UserAssigned userAssignedIdentities: diff --git a/templates/test/ci/prow-machine-pool-ci-version/patches/machine-pool-ci-version-windows.yaml b/templates/test/ci/prow-machine-pool-ci-version/patches/machine-pool-ci-version-windows.yaml index 07beec81a4c..b674abf6f37 100644 --- a/templates/test/ci/prow-machine-pool-ci-version/patches/machine-pool-ci-version-windows.yaml +++ b/templates/test/ci/prow-machine-pool-ci-version/patches/machine-pool-ci-version-windows.yaml @@ -11,7 +11,7 @@ spec: marketplace: publisher: cncf-upstream offer: capi-windows - sku: ${WINDOWS_SERVER_VERSION:=windows-2019}-containerd-gen1 + sku: ${WINDOWS_SERVER_VERSION:=windows-2022}-containerd-gen1 version: latest identity: UserAssigned userAssignedIdentities: diff --git a/templates/test/dev/cluster-template-custom-builds-machine-pool-windows.yaml b/templates/test/dev/cluster-template-custom-builds-machine-pool-windows.yaml index 8b049d46e3e..44e7c413b09 100644 --- a/templates/test/dev/cluster-template-custom-builds-machine-pool-windows.yaml +++ b/templates/test/dev/cluster-template-custom-builds-machine-pool-windows.yaml @@ -436,7 +436,7 @@ spec: marketplace: offer: capi-windows publisher: cncf-upstream - sku: ${WINDOWS_SERVER_VERSION:=windows-2019}-containerd-gen1 + sku: ${WINDOWS_SERVER_VERSION:=windows-2022}-containerd-gen1 version: latest osDisk: diskSizeGB: 128 diff --git a/templates/test/dev/cluster-template-custom-builds-windows.yaml b/templates/test/dev/cluster-template-custom-builds-windows.yaml index b0621f1aabd..5d5563fdf00 100644 --- a/templates/test/dev/cluster-template-custom-builds-windows.yaml +++ b/templates/test/dev/cluster-template-custom-builds-windows.yaml @@ -421,7 +421,7 @@ spec: marketplace: offer: capi-windows publisher: cncf-upstream - sku: ${WINDOWS_SERVER_VERSION:=windows-2019}-containerd-gen1 + sku: ${WINDOWS_SERVER_VERSION:=windows-2022}-containerd-gen1 version: latest osDisk: diskSizeGB: 128 diff --git a/templates/test/dev/custom-builds-machine-pool-windows/patches/machine-pool-deployment-pr-version-windows.yaml b/templates/test/dev/custom-builds-machine-pool-windows/patches/machine-pool-deployment-pr-version-windows.yaml index a18713bbeb2..09dddfc1e7e 100644 --- a/templates/test/dev/custom-builds-machine-pool-windows/patches/machine-pool-deployment-pr-version-windows.yaml +++ b/templates/test/dev/custom-builds-machine-pool-windows/patches/machine-pool-deployment-pr-version-windows.yaml @@ -10,5 +10,5 @@ spec: marketplace: publisher: cncf-upstream offer: capi-windows - sku: ${WINDOWS_SERVER_VERSION:=windows-2019}-containerd-gen1 + sku: ${WINDOWS_SERVER_VERSION:=windows-2022}-containerd-gen1 version: latest diff --git a/templates/test/dev/custom-builds-machine-pool/patches/machine-pool-deployment-pr-version-windows.yaml b/templates/test/dev/custom-builds-machine-pool/patches/machine-pool-deployment-pr-version-windows.yaml index a18713bbeb2..09dddfc1e7e 100644 --- a/templates/test/dev/custom-builds-machine-pool/patches/machine-pool-deployment-pr-version-windows.yaml +++ b/templates/test/dev/custom-builds-machine-pool/patches/machine-pool-deployment-pr-version-windows.yaml @@ -10,5 +10,5 @@ spec: marketplace: publisher: cncf-upstream offer: capi-windows - sku: ${WINDOWS_SERVER_VERSION:=windows-2019}-containerd-gen1 + sku: ${WINDOWS_SERVER_VERSION:=windows-2022}-containerd-gen1 version: latest diff --git a/templates/test/dev/custom-builds-windows/patches/machine-deployment-pr-version-windows.yaml b/templates/test/dev/custom-builds-windows/patches/machine-deployment-pr-version-windows.yaml index c153570d2eb..782794045ef 100644 --- a/templates/test/dev/custom-builds-windows/patches/machine-deployment-pr-version-windows.yaml +++ b/templates/test/dev/custom-builds-windows/patches/machine-deployment-pr-version-windows.yaml @@ -15,5 +15,5 @@ spec: marketplace: publisher: cncf-upstream offer: capi-windows - sku: ${WINDOWS_SERVER_VERSION:=windows-2019}-containerd-gen1 + sku: ${WINDOWS_SERVER_VERSION:=windows-2022}-containerd-gen1 version: latest diff --git a/templates/test/dev/custom-builds/patches/machine-deployment-pr-version-windows.yaml b/templates/test/dev/custom-builds/patches/machine-deployment-pr-version-windows.yaml index c153570d2eb..782794045ef 100644 --- a/templates/test/dev/custom-builds/patches/machine-deployment-pr-version-windows.yaml +++ b/templates/test/dev/custom-builds/patches/machine-deployment-pr-version-windows.yaml @@ -15,5 +15,5 @@ spec: marketplace: publisher: cncf-upstream offer: capi-windows - sku: ${WINDOWS_SERVER_VERSION:=windows-2019}-containerd-gen1 + sku: ${WINDOWS_SERVER_VERSION:=windows-2022}-containerd-gen1 version: latest diff --git a/test/e2e/helpers.go b/test/e2e/helpers.go index 0353f08e981..b4a2c65f371 100644 --- a/test/e2e/helpers.go +++ b/test/e2e/helpers.go @@ -700,7 +700,7 @@ func resolveKubernetesVersions(config *clusterctl.E2EConfig) { windowsRequired := testWindows == "true" if windowsRequired { - windowsVersions := getVersionsInCommunityGallery(ctx, os.Getenv(AzureLocation), capiCommunityGallery, "capi-win-2019-containerd") + windowsVersions := getVersionsInCommunityGallery(ctx, os.Getenv(AzureLocation), capiCommunityGallery, "capi-win-2022-containerd") for k, v := range linuxVersions { if _, ok := windowsVersions[k]; ok { versions = append(versions, v)