From 5c169cf39b3cc4ff0c080812c59453c635650331 Mon Sep 17 00:00:00 2001 From: Rohit Jaini Date: Thu, 26 Sep 2019 12:03:53 -0700 Subject: [PATCH 1/3] image changes --- parts/k8s/windowskubeletfunc.ps1 | 16 ++++++++++++++-- pkg/engine/templates_generated.go | 16 ++++++++++++++-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/parts/k8s/windowskubeletfunc.ps1 b/parts/k8s/windowskubeletfunc.ps1 index 27783ae231..deaf2e1915 100644 --- a/parts/k8s/windowskubeletfunc.ps1 +++ b/parts/k8s/windowskubeletfunc.ps1 @@ -162,8 +162,20 @@ New-InfraContainer { $defaultPauseImage = "mcr.microsoft.com/k8s/core/pause:1.2.0" switch ($computerInfo.WindowsVersion) { - "1803" { docker pull $defaultPauseImage ; docker tag $defaultPauseImage $DestinationTag } - "1809" { docker pull $defaultPauseImage ; docker tag $defaultPauseImage $DestinationTag } + "1803" { + $imageList = docker images $defaultPauseImage --format "{{.Repository}}:{{.Tag}}" + if (-not $imageList) { + docker pull $defaultPauseImage + docker tag $defaultPauseImage $DestinationTag + } + } + "1809" { + $imageList = docker images $defaultPauseImage --format "{{.Repository}}:{{.Tag}}" + if (-not $imageList) { + docker pull $defaultPauseImage + docker tag $defaultPauseImage $DestinationTag + } + } "1903" { Build-PauseContainer -WindowsBase "mcr.microsoft.com/windows/nanoserver:1903" -DestinationTag $DestinationTag} default { Build-PauseContainer -WindowsBase "mcr.microsoft.com/nanoserver-insider" -DestinationTag $DestinationTag} } diff --git a/pkg/engine/templates_generated.go b/pkg/engine/templates_generated.go index af4cd9052b..c7b3ebded1 100644 --- a/pkg/engine/templates_generated.go +++ b/pkg/engine/templates_generated.go @@ -26291,8 +26291,20 @@ New-InfraContainer { $defaultPauseImage = "mcr.microsoft.com/k8s/core/pause:1.2.0" switch ($computerInfo.WindowsVersion) { - "1803" { docker pull $defaultPauseImage ; docker tag $defaultPauseImage $DestinationTag } - "1809" { docker pull $defaultPauseImage ; docker tag $defaultPauseImage $DestinationTag } + "1803" { + $imageList = docker images $defaultPauseImage --format "{{.Repository}}:{{.Tag}}" + if (-not $imageList) { + docker pull $defaultPauseImage + docker tag $defaultPauseImage $DestinationTag + } + } + "1809" { + $imageList = docker images $defaultPauseImage --format "{{.Repository}}:{{.Tag}}" + if (-not $imageList) { + docker pull $defaultPauseImage + docker tag $defaultPauseImage $DestinationTag + } + } "1903" { Build-PauseContainer -WindowsBase "mcr.microsoft.com/windows/nanoserver:1903" -DestinationTag $DestinationTag} default { Build-PauseContainer -WindowsBase "mcr.microsoft.com/nanoserver-insider" -DestinationTag $DestinationTag} } From f377a968ce0ff433a9f8fb3d47cb98700ef41c20 Mon Sep 17 00:00:00 2001 From: Rohit Date: Thu, 26 Sep 2019 12:14:13 -0700 Subject: [PATCH 2/3] Add 1.16.0 in vhd prep --- packer/configure-windows-vhd.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/packer/configure-windows-vhd.ps1 b/packer/configure-windows-vhd.ps1 index edaad2a2e3..bb50d6866c 100644 --- a/packer/configure-windows-vhd.ps1 +++ b/packer/configure-windows-vhd.ps1 @@ -63,6 +63,7 @@ function Get-FilesToCacheOnVHD "https://acs-mirror.azureedge.net/wink8s/azs-v1.14.7-1int.zip", "https://acs-mirror.azureedge.net/wink8s/azs-v1.15.3-1int.zip", "https://acs-mirror.azureedge.net/wink8s/azs-v1.15.4-1int.zip", + "https://acs-mirror.azureedge.net/wink8s/azs-v1.16.0-1int.zip" "https://acs-mirror.azureedge.net/wink8s/v1.14.6-1int.zip", "https://acs-mirror.azureedge.net/wink8s/v1.14.7-1int.zip", "https://acs-mirror.azureedge.net/wink8s/v1.15.3-1int.zip", From ff291ce75deb7770554faaa553940e90bdab3a62 Mon Sep 17 00:00:00 2001 From: Rohit Date: Fri, 27 Sep 2019 16:45:20 -0700 Subject: [PATCH 3/3] fix the tagging issue --- parts/k8s/windowskubeletfunc.ps1 | 8 ++++---- pkg/engine/templates_generated.go | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/parts/k8s/windowskubeletfunc.ps1 b/parts/k8s/windowskubeletfunc.ps1 index deaf2e1915..660f3fbbb0 100644 --- a/parts/k8s/windowskubeletfunc.ps1 +++ b/parts/k8s/windowskubeletfunc.ps1 @@ -165,16 +165,16 @@ New-InfraContainer { "1803" { $imageList = docker images $defaultPauseImage --format "{{.Repository}}:{{.Tag}}" if (-not $imageList) { - docker pull $defaultPauseImage - docker tag $defaultPauseImage $DestinationTag + docker pull $defaultPauseImage } + docker tag $defaultPauseImage $DestinationTag } "1809" { $imageList = docker images $defaultPauseImage --format "{{.Repository}}:{{.Tag}}" if (-not $imageList) { - docker pull $defaultPauseImage - docker tag $defaultPauseImage $DestinationTag + docker pull $defaultPauseImage } + docker tag $defaultPauseImage $DestinationTag } "1903" { Build-PauseContainer -WindowsBase "mcr.microsoft.com/windows/nanoserver:1903" -DestinationTag $DestinationTag} default { Build-PauseContainer -WindowsBase "mcr.microsoft.com/nanoserver-insider" -DestinationTag $DestinationTag} diff --git a/pkg/engine/templates_generated.go b/pkg/engine/templates_generated.go index c7b3ebded1..146100ad9b 100644 --- a/pkg/engine/templates_generated.go +++ b/pkg/engine/templates_generated.go @@ -26294,16 +26294,16 @@ New-InfraContainer { "1803" { $imageList = docker images $defaultPauseImage --format "{{.Repository}}:{{.Tag}}" if (-not $imageList) { - docker pull $defaultPauseImage - docker tag $defaultPauseImage $DestinationTag + docker pull $defaultPauseImage } + docker tag $defaultPauseImage $DestinationTag } "1809" { $imageList = docker images $defaultPauseImage --format "{{.Repository}}:{{.Tag}}" if (-not $imageList) { - docker pull $defaultPauseImage - docker tag $defaultPauseImage $DestinationTag + docker pull $defaultPauseImage } + docker tag $defaultPauseImage $DestinationTag } "1903" { Build-PauseContainer -WindowsBase "mcr.microsoft.com/windows/nanoserver:1903" -DestinationTag $DestinationTag} default { Build-PauseContainer -WindowsBase "mcr.microsoft.com/nanoserver-insider" -DestinationTag $DestinationTag}