Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 7 additions & 0 deletions parts/k8s/windowscontainerdfunc.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ function Select-Windows-Version {
"18363" { return "1909" }
"19041" { return "2004" }
"19042" { return "20H2" }
"20348" { return "ltsc2022" }
Default { return "" }
}
}
Expand Down Expand Up @@ -161,12 +162,18 @@ function Install-Containerd {
$formatedconf = $(($CNIConfDir).Replace("\", "/"))
$sandboxIsolation = 0
$windowsReleaseId = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").ReleaseId
$windowsCurrentBuild = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").CurrentBuild
Comment thread
jsturtevant marked this conversation as resolved.
Outdated
# Starting with 20H2 tags used to publish contianer images may not match the 'ReleaseId'
switch ($windowsReleaseId)
{
"2009" { $windowsVersion = "20H2"}
default { $windowsVersion = $windowsReleaseId}
}
switch ($windowsCurrentBuild)
{
"20348" { $windowsVersion = "ltsc2022" }
default { $windowsVersion = $windowsReleaseId}
}
$hypervRuntimes = ""
$hypervHandlers = $global:HypervRuntimeHandlers.split(",", [System.StringSplitOptions]::RemoveEmptyEntries)

Expand Down
2 changes: 1 addition & 1 deletion parts/k8s/windowskubeletfunc.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ New-InfraContainer {
$clusterConfig = ConvertFrom-Json ((Get-Content $global:KubeClusterConfigPath -ErrorAction Stop) | Out-String)
$defaultPauseImage = $clusterConfig.Cri.Images.Pause

$pauseImageVersions = @("1809", "1903", "1909", "2004", "2009", "20h2")
$pauseImageVersions = @("1809", "1903", "1909", "2004", "2009", "20h2", "ltsc2022")

if ($pauseImageVersions -icontains $windowsVersion) {
if ($ContainerRuntime -eq "docker") {
Expand Down