diff --git a/templates/addons/windows/kube-proxy-windows.yaml b/templates/addons/windows/kube-proxy-windows.yaml index bd087b992d7..6c16dc7e02f 100644 --- a/templates/addons/windows/kube-proxy-windows.yaml +++ b/templates/addons/windows/kube-proxy-windows.yaml @@ -5,6 +5,11 @@ data: mkdir -force /host/var/lib/kube-proxy/var/run/secrets/kubernetes.io/serviceaccount mkdir -force /host/k/kube-proxy + if($env:USE_CI_VERSION && Test-Path -Path "/host/k/kube-proxy.exe") + { + cp -force /host/k/kube-proxy.exe /k/kube-proxy/kube-proxy.exe + } + cp -force /k/kube-proxy/* /host/k/kube-proxy cp -force /var/lib/kube-proxy/* /host/var/lib/kube-proxy cp -force /var/run/secrets/kubernetes.io/serviceaccount/* /host/var/lib/kube-proxy/var/run/secrets/kubernetes.io/serviceaccount #FIXME? @@ -57,7 +62,9 @@ spec: valueFrom: fieldRef: fieldPath: status.podIP - image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION}-nanoserver + - name: USE_CI_VERSION + value: "${USE_CI_VERSION:false}" + image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION/+/_}-nanoserver name: kube-proxy volumeMounts: - name: wins 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 ae402d2c66a..ff0322a9334 100644 --- a/templates/test/ci/cluster-template-prow-ci-version-windows.yaml +++ b/templates/test/ci/cluster-template-prow-ci-version-windows.yaml @@ -412,8 +412,8 @@ spec: marketplace: offer: capi-windows publisher: cncf-upstream - sku: k8s-1dot18dot13-windows-2019 - version: 2020.12.11 + sku: k8s-1dot18dot19-windows-2019 + version: 2021.05.17 osDisk: diskSizeGB: 128 managedDisk: @@ -466,10 +466,14 @@ spec: } } + # We are using a VHD that maps to v1.18.19 so the kubeproxy image is already pulled. (pull it just in case) + # Tag it to the ci version. The image knows how to use the copy locally. + docker pull sigwindowstools/kube-proxy:v1.18.19-nanoserver + docker tag sigwindowstools/kube-proxy:v1.18.19-nanoserver "sigwindowstools/kube-proxy:${CI_VERSION/+/_}-nanoserver" + kubeadm.exe version -o=short kubectl.exe version --client=true --short=true kubelet.exe --version - #kubeproxy.exe --version path: C:/replace-k8s-binaries.ps1 permissions: "0744" joinConfiguration: @@ -1284,6 +1288,11 @@ data: mkdir -force /host/var/lib/kube-proxy/var/run/secrets/kubernetes.io/serviceaccount mkdir -force /host/k/kube-proxy + if($env:USE_CI_VERSION && Test-Path -Path "/host/k/kube-proxy.exe") + { + cp -force /host/k/kube-proxy.exe /k/kube-proxy/kube-proxy.exe + } + cp -force /k/kube-proxy/* /host/k/kube-proxy cp -force /var/lib/kube-proxy/* /host/var/lib/kube-proxy cp -force /var/run/secrets/kubernetes.io/serviceaccount/* /host/var/lib/kube-proxy/var/run/secrets/kubernetes.io/serviceaccount #FIXME? @@ -1336,7 +1345,9 @@ data: valueFrom: fieldRef: fieldPath: status.podIP - image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION}-nanoserver + - name: USE_CI_VERSION + value: "${USE_CI_VERSION:false}" + image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION/+/_}-nanoserver name: kube-proxy volumeMounts: - name: wins diff --git a/templates/test/ci/cluster-template-prow-machine-pool-windows.yaml b/templates/test/ci/cluster-template-prow-machine-pool-windows.yaml index 8a8498ad416..50be005ab61 100644 --- a/templates/test/ci/cluster-template-prow-machine-pool-windows.yaml +++ b/templates/test/ci/cluster-template-prow-machine-pool-windows.yaml @@ -1106,6 +1106,11 @@ data: mkdir -force /host/var/lib/kube-proxy/var/run/secrets/kubernetes.io/serviceaccount mkdir -force /host/k/kube-proxy + if($env:USE_CI_VERSION && Test-Path -Path "/host/k/kube-proxy.exe") + { + cp -force /host/k/kube-proxy.exe /k/kube-proxy/kube-proxy.exe + } + cp -force /k/kube-proxy/* /host/k/kube-proxy cp -force /var/lib/kube-proxy/* /host/var/lib/kube-proxy cp -force /var/run/secrets/kubernetes.io/serviceaccount/* /host/var/lib/kube-proxy/var/run/secrets/kubernetes.io/serviceaccount #FIXME? @@ -1158,7 +1163,9 @@ data: valueFrom: fieldRef: fieldPath: status.podIP - image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION}-nanoserver + - name: USE_CI_VERSION + value: "${USE_CI_VERSION:false}" + image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION/+/_}-nanoserver name: kube-proxy volumeMounts: - name: wins diff --git a/templates/test/ci/cluster-template-prow-windows.yaml b/templates/test/ci/cluster-template-prow-windows.yaml index 8b643e43d66..64af2f31b79 100644 --- a/templates/test/ci/cluster-template-prow-windows.yaml +++ b/templates/test/ci/cluster-template-prow-windows.yaml @@ -1114,6 +1114,11 @@ data: mkdir -force /host/var/lib/kube-proxy/var/run/secrets/kubernetes.io/serviceaccount mkdir -force /host/k/kube-proxy + if($env:USE_CI_VERSION && Test-Path -Path "/host/k/kube-proxy.exe") + { + cp -force /host/k/kube-proxy.exe /k/kube-proxy/kube-proxy.exe + } + cp -force /k/kube-proxy/* /host/k/kube-proxy cp -force /var/lib/kube-proxy/* /host/var/lib/kube-proxy cp -force /var/run/secrets/kubernetes.io/serviceaccount/* /host/var/lib/kube-proxy/var/run/secrets/kubernetes.io/serviceaccount #FIXME? @@ -1166,7 +1171,9 @@ data: valueFrom: fieldRef: fieldPath: status.podIP - image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION}-nanoserver + - name: USE_CI_VERSION + value: "${USE_CI_VERSION:false}" + image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION/+/_}-nanoserver name: kube-proxy volumeMounts: - name: wins diff --git a/templates/test/ci/prow-ci-version-windows/patches/machine-deployment-ci-version.yaml b/templates/test/ci/prow-ci-version-windows/patches/machine-deployment-ci-version.yaml index a449435b640..7b6010dc8dc 100644 --- a/templates/test/ci/prow-ci-version-windows/patches/machine-deployment-ci-version.yaml +++ b/templates/test/ci/prow-ci-version-windows/patches/machine-deployment-ci-version.yaml @@ -15,11 +15,15 @@ curl.exe --retry 10 --retry-delay 5 "$$ci_url/$$binary.exe" --output "c:/k/$$binary.exe" } } - + + # We are using a VHD that maps to v1.18.19 so the kubeproxy image is already pulled. (pull it just in case) + # Tag it to the ci version. The image knows how to use the copy locally. + docker pull sigwindowstools/kube-proxy:v1.18.19-nanoserver + docker tag sigwindowstools/kube-proxy:v1.18.19-nanoserver "sigwindowstools/kube-proxy:${CI_VERSION/+/_}-nanoserver" + kubeadm.exe version -o=short kubectl.exe version --client=true --short=true kubelet.exe --version - #kubeproxy.exe --version path: C:/replace-k8s-binaries.ps1 permissions: "0744" - op: add diff --git a/templates/test/ci/prow-ci-version-windows/patches/windows-image-update.yaml b/templates/test/ci/prow-ci-version-windows/patches/windows-image-update.yaml index 559f80512b9..79d7502076f 100644 --- a/templates/test/ci/prow-ci-version-windows/patches/windows-image-update.yaml +++ b/templates/test/ci/prow-ci-version-windows/patches/windows-image-update.yaml @@ -12,5 +12,5 @@ spec: marketplace: publisher: cncf-upstream offer: capi-windows - sku: k8s-1dot18dot13-windows-2019 - version: "2020.12.11" \ No newline at end of file + sku: k8s-1dot18dot19-windows-2019 + version: "2021.05.17" \ No newline at end of file diff --git a/templates/test/dev/cluster-template-custom-builds-windows.yaml b/templates/test/dev/cluster-template-custom-builds-windows.yaml index a27440bec42..f2efdd69870 100644 --- a/templates/test/dev/cluster-template-custom-builds-windows.yaml +++ b/templates/test/dev/cluster-template-custom-builds-windows.yaml @@ -334,8 +334,8 @@ spec: marketplace: offer: capi-windows publisher: cncf-upstream - sku: k8s-1dot18dot13-windows-2019 - version: 2020.12.11 + sku: k8s-1dot18dot19-windows-2019 + version: 2021.05.17 osDisk: diskSizeGB: 128 managedDisk: @@ -384,10 +384,14 @@ spec: curl.exe --retry 10 --retry-delay 5 "$$ci_url/$$binary.exe" --output "c:/k/$$binary.exe" } + # We are using a VHD that maps to v1.18.19 so the kubeproxy image is already pulled. (pull it just in case) + # Tag it to the ci version. The image knows how to use the copy locally. + docker pull sigwindowstools/kube-proxy:v1.18.19-nanoserver + docker tag sigwindowstools/kube-proxy:v1.18.19-nanoserver "sigwindowstools/kube-proxy:${KUBE_GIT_VERSION/+/_}-nanoserver" + kubeadm.exe version -o=short kubectl.exe version --client=true --short=true kubelet.exe --version - #kubeproxy.exe --version path: C:/replace-k8s-binaries.ps1 permissions: "0744" joinConfiguration: @@ -1202,6 +1206,11 @@ data: mkdir -force /host/var/lib/kube-proxy/var/run/secrets/kubernetes.io/serviceaccount mkdir -force /host/k/kube-proxy + if($env:USE_CI_VERSION && Test-Path -Path "/host/k/kube-proxy.exe") + { + cp -force /host/k/kube-proxy.exe /k/kube-proxy/kube-proxy.exe + } + cp -force /k/kube-proxy/* /host/k/kube-proxy cp -force /var/lib/kube-proxy/* /host/var/lib/kube-proxy cp -force /var/run/secrets/kubernetes.io/serviceaccount/* /host/var/lib/kube-proxy/var/run/secrets/kubernetes.io/serviceaccount #FIXME? @@ -1254,7 +1263,9 @@ data: valueFrom: fieldRef: fieldPath: status.podIP - image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION}-nanoserver + - name: USE_CI_VERSION + value: "${USE_CI_VERSION:false}" + image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION/+/_}-nanoserver name: kube-proxy volumeMounts: - name: wins diff --git a/templates/test/dev/custom-builds-windows/patches/custom-builds-windows.yaml b/templates/test/dev/custom-builds-windows/patches/custom-builds-windows.yaml index 03e7d0c4f41..27a5a634eee 100644 --- a/templates/test/dev/custom-builds-windows/patches/custom-builds-windows.yaml +++ b/templates/test/dev/custom-builds-windows/patches/custom-builds-windows.yaml @@ -12,10 +12,14 @@ curl.exe --retry 10 --retry-delay 5 "$$ci_url/$$binary.exe" --output "c:/k/$$binary.exe" } + # We are using a VHD that maps to v1.18.19 so the kubeproxy image is already pulled. (pull it just in case) + # Tag it to the ci version. The image knows how to use the copy locally. + docker pull sigwindowstools/kube-proxy:v1.18.19-nanoserver + docker tag sigwindowstools/kube-proxy:v1.18.19-nanoserver "sigwindowstools/kube-proxy:${KUBE_GIT_VERSION/+/_}-nanoserver" + kubeadm.exe version -o=short kubectl.exe version --client=true --short=true kubelet.exe --version - #kubeproxy.exe --version path: C:/replace-k8s-binaries.ps1 permissions: "0744" - op: add diff --git a/templates/test/dev/custom-builds-windows/patches/windows-image-update.yaml b/templates/test/dev/custom-builds-windows/patches/windows-image-update.yaml index 559f80512b9..79d7502076f 100644 --- a/templates/test/dev/custom-builds-windows/patches/windows-image-update.yaml +++ b/templates/test/dev/custom-builds-windows/patches/windows-image-update.yaml @@ -12,5 +12,5 @@ spec: marketplace: publisher: cncf-upstream offer: capi-windows - sku: k8s-1dot18dot13-windows-2019 - version: "2020.12.11" \ No newline at end of file + sku: k8s-1dot18dot19-windows-2019 + version: "2021.05.17" \ No newline at end of file diff --git a/test/e2e/conformance_test.go b/test/e2e/conformance_test.go index 40bebeb74a7..b88cf87a2b8 100644 --- a/test/e2e/conformance_test.go +++ b/test/e2e/conformance_test.go @@ -99,6 +99,8 @@ var _ = Describe("Conformance Tests", func() { if isWindows(kubetestConfigFilePath) { flavor = flavor + "-windows" + // tell windows kube-proxy to use the version supplied via CI + Expect(os.Setenv("USE_CI_VERSION", "true")).To(Succeed()) } }