Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions test/cri-containerd/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,16 @@ func getWindowsNanoserverImage(build uint16) string {
return "mcr.microsoft.com/windows/nanoserver:2004"
case osversion.V20H2:
return "mcr.microsoft.com/windows/nanoserver:2009"
case osversion.V21H2Server:
return "mcr.microsoft.com/windows/nanoserver:ltsc2022"
default:
// Due to some efforts in improving down-level compatibility for Windows containers (see
// https://techcommunity.microsoft.com/t5/containers/windows-server-2022-and-beyond-for-containers/ba-p/2712487)
// the ltsc2022 image should continue to work on builds ws2022 and onwards. With this in mind,
// if there's no mapping for the host build, just use the Windows Server 2022 image.
if build > osversion.V21H2Server {
return "mcr.microsoft.com/windows/nanoserver:ltsc2022"
}
panic("unsupported build")
}
}
Expand All @@ -187,7 +196,16 @@ func getWindowsServerCoreImage(build uint16) string {
return "mcr.microsoft.com/windows/servercore:2004"
case osversion.V20H2:
return "mcr.microsoft.com/windows/servercore:2009"
case osversion.V21H2Server:
return "mcr.microsoft.com/windows/servercore:ltsc2022"
default:
// Due to some efforts in improving down-level compatibility for Windows containers (see
// https://techcommunity.microsoft.com/t5/containers/windows-server-2022-and-beyond-for-containers/ba-p/2712487)
// the ltsc2022 image should continue to work on builds ws2022 and onwards. With this in mind,
// if there's no mapping for the host build, just use the Windows Server 2022 image.
if build > osversion.V21H2Server {
return "mcr.microsoft.com/windows/servercore:ltsc2022"
}
panic("unsupported build")
}
}
Expand Down