Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

feat: update pause image to 1.3.0 (includes 1903 and 1909 support) (#… #2869

Merged
merged 1 commit into from
Mar 10, 2020
Merged
Show file tree
Hide file tree
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
30 changes: 12 additions & 18 deletions parts/k8s/windowskubeletfunc.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -159,25 +159,19 @@ New-InfraContainer {
# Reference for these tags: curl -L https://mcr.microsoft.com/v2/k8s/core/pause/tags/list
# Then docker run --rm mplatform/manifest-tool inspect mcr.microsoft.com/k8s/core/pause:<tag>

$defaultPauseImage = "mcr.microsoft.com/k8s/core/pause:1.2.0"

switch ($computerInfo.WindowsVersion) {
"1803" {
$imageList = docker images $defaultPauseImage --format "{{.Repository}}:{{.Tag}}"
if (-not $imageList) {
Invoke-Executable -Executable "docker" -ArgList @("pull", "$defaultPauseImage") -Retries 5 -RetryDelaySeconds 30
}
Invoke-Executable -Executable "docker" -ArgList @("tag", "$defaultPauseImage", "$DestinationTag")
}
"1809" {
$imageList = docker images $defaultPauseImage --format "{{.Repository}}:{{.Tag}}"
if (-not $imageList) {
Invoke-Executable -Executable "docker" -ArgList @("pull", "$defaultPauseImage") -Retries 5 -RetryDelaySeconds 30
}
Invoke-Executable -Executable "docker" -ArgList @("tag", "$defaultPauseImage", "$DestinationTag")
$defaultPauseImage = "mcr.microsoft.com/oss/kubernetes/pause:1.3.0"

$pauseImageVersions = @("1803", "1809", "1903", "1909")

if ($pauseImageVersions -icontains $computerInfo.WindowsVersion) {
$imageList = docker images $defaultPauseImage --format "{{.Repository}}:{{.Tag}}"
if (-not $imageList) {
Invoke-Executable -Executable "docker" -ArgList @("pull", "$defaultPauseImage") -Retries 5 -RetryDelaySeconds 30
}
"1903" { Build-PauseContainer -WindowsBase "mcr.microsoft.com/windows/nanoserver:1903" -DestinationTag $DestinationTag}
default { Build-PauseContainer -WindowsBase "mcr.microsoft.com/nanoserver-insider" -DestinationTag $DestinationTag}
Invoke-Executable -Executable "docker" -ArgList @("tag", "$defaultPauseImage", "$DestinationTag")
}
else {
Build-PauseContainer -WindowsBase "mcr.microsoft.com/nanoserver-insider" -DestinationTag $DestinationTag
}
}

Expand Down
28 changes: 11 additions & 17 deletions pkg/engine/templates_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vhd/packer/configure-windows-vhd.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function Get-ContainerImages
$imagesToPull = @(
"mcr.microsoft.com/windows/servercore:ltsc2019",
"mcr.microsoft.com/windows/nanoserver:1809",
"mcr.microsoft.com/k8s/core/pause:1.2.0")
"mcr.microsoft.com/oss/kubernetes/pause:1.3.0")

foreach ($image in $imagesToPull) {
docker pull $image
Expand Down