Skip to content

Commit e0a7baa

Browse files
committed
update kube-proxy to the correct version
1 parent 47446b9 commit e0a7baa

10 files changed

+71
-18
lines changed

templates/addons/windows/kube-proxy-windows.yaml

+8-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ data:
55
mkdir -force /host/var/lib/kube-proxy/var/run/secrets/kubernetes.io/serviceaccount
66
mkdir -force /host/k/kube-proxy
77
8+
if($env:USE_CI_VERSION && Test-Path -Path "/host/k/kube-proxy.exe")
9+
{
10+
cp -force /host/k/kube-proxy.exe /k/kube-proxy/kube-proxy.exe
11+
}
12+
813
cp -force /k/kube-proxy/* /host/k/kube-proxy
914
cp -force /var/lib/kube-proxy/* /host/var/lib/kube-proxy
1015
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:
5762
valueFrom:
5863
fieldRef:
5964
fieldPath: status.podIP
60-
image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION}-nanoserver
65+
- name: USE_CI_VERSION
66+
value: "${USE_CI_VERSION:false}"
67+
image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION/+/_}-nanoserver
6168
name: kube-proxy
6269
volumeMounts:
6370
- name: wins

templates/test/ci/cluster-template-prow-ci-version-windows.yaml

+15-4
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,8 @@ spec:
412412
marketplace:
413413
offer: capi-windows
414414
publisher: cncf-upstream
415-
sku: k8s-1dot18dot13-windows-2019
416-
version: 2020.12.11
415+
sku: k8s-1dot18dot19-windows-2019
416+
version: 2021.05.17
417417
osDisk:
418418
diskSizeGB: 128
419419
managedDisk:
@@ -466,10 +466,14 @@ spec:
466466
}
467467
}
468468
469+
# We are using a VHD that maps to v1.18.19 so the kubeproxy image is already pulled. (pull it just in case)
470+
# Tag it to the ci version. The image knows how to use the copy locally.
471+
docker pull sigwindowstools/kube-proxy:v1.18.19-nanoserver
472+
docker tag sigwindowstools/kube-proxy:v1.18.19-nanoserver "sigwindowstools/kube-proxy:${CI_VERSION/+/_}-nanoserver"
473+
469474
kubeadm.exe version -o=short
470475
kubectl.exe version --client=true --short=true
471476
kubelet.exe --version
472-
#kubeproxy.exe --version
473477
path: C:/replace-k8s-binaries.ps1
474478
permissions: "0744"
475479
joinConfiguration:
@@ -1284,6 +1288,11 @@ data:
12841288
mkdir -force /host/var/lib/kube-proxy/var/run/secrets/kubernetes.io/serviceaccount
12851289
mkdir -force /host/k/kube-proxy
12861290
1291+
if($env:USE_CI_VERSION && Test-Path -Path "/host/k/kube-proxy.exe")
1292+
{
1293+
cp -force /host/k/kube-proxy.exe /k/kube-proxy/kube-proxy.exe
1294+
}
1295+
12871296
cp -force /k/kube-proxy/* /host/k/kube-proxy
12881297
cp -force /var/lib/kube-proxy/* /host/var/lib/kube-proxy
12891298
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:
13361345
valueFrom:
13371346
fieldRef:
13381347
fieldPath: status.podIP
1339-
image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION}-nanoserver
1348+
- name: USE_CI_VERSION
1349+
value: "${USE_CI_VERSION:false}"
1350+
image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION/+/_}-nanoserver
13401351
name: kube-proxy
13411352
volumeMounts:
13421353
- name: wins

templates/test/ci/cluster-template-prow-machine-pool-windows.yaml

+8-1
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,11 @@ data:
11061106
mkdir -force /host/var/lib/kube-proxy/var/run/secrets/kubernetes.io/serviceaccount
11071107
mkdir -force /host/k/kube-proxy
11081108
1109+
if($env:USE_CI_VERSION && Test-Path -Path "/host/k/kube-proxy.exe")
1110+
{
1111+
cp -force /host/k/kube-proxy.exe /k/kube-proxy/kube-proxy.exe
1112+
}
1113+
11091114
cp -force /k/kube-proxy/* /host/k/kube-proxy
11101115
cp -force /var/lib/kube-proxy/* /host/var/lib/kube-proxy
11111116
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:
11581163
valueFrom:
11591164
fieldRef:
11601165
fieldPath: status.podIP
1161-
image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION}-nanoserver
1166+
- name: USE_CI_VERSION
1167+
value: "${USE_CI_VERSION:false}"
1168+
image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION/+/_}-nanoserver
11621169
name: kube-proxy
11631170
volumeMounts:
11641171
- name: wins

templates/test/ci/cluster-template-prow-windows.yaml

+8-1
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,11 @@ data:
11141114
mkdir -force /host/var/lib/kube-proxy/var/run/secrets/kubernetes.io/serviceaccount
11151115
mkdir -force /host/k/kube-proxy
11161116
1117+
if($env:USE_CI_VERSION && Test-Path -Path "/host/k/kube-proxy.exe")
1118+
{
1119+
cp -force /host/k/kube-proxy.exe /k/kube-proxy/kube-proxy.exe
1120+
}
1121+
11171122
cp -force /k/kube-proxy/* /host/k/kube-proxy
11181123
cp -force /var/lib/kube-proxy/* /host/var/lib/kube-proxy
11191124
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:
11661171
valueFrom:
11671172
fieldRef:
11681173
fieldPath: status.podIP
1169-
image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION}-nanoserver
1174+
- name: USE_CI_VERSION
1175+
value: "${USE_CI_VERSION:false}"
1176+
image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION/+/_}-nanoserver
11701177
name: kube-proxy
11711178
volumeMounts:
11721179
- name: wins

templates/test/ci/prow-ci-version-windows/patches/machine-deployment-ci-version.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,15 @@
1515
curl.exe --retry 10 --retry-delay 5 "$$ci_url/$$binary.exe" --output "c:/k/$$binary.exe"
1616
}
1717
}
18-
18+
19+
# We are using a VHD that maps to v1.18.19 so the kubeproxy image is already pulled. (pull it just in case)
20+
# Tag it to the ci version. The image knows how to use the copy locally.
21+
docker pull sigwindowstools/kube-proxy:v1.18.19-nanoserver
22+
docker tag sigwindowstools/kube-proxy:v1.18.19-nanoserver "sigwindowstools/kube-proxy:${CI_VERSION/+/_}-nanoserver"
23+
1924
kubeadm.exe version -o=short
2025
kubectl.exe version --client=true --short=true
2126
kubelet.exe --version
22-
#kubeproxy.exe --version
2327
path: C:/replace-k8s-binaries.ps1
2428
permissions: "0744"
2529
- op: add

templates/test/ci/prow-ci-version-windows/patches/windows-image-update.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ spec:
1212
marketplace:
1313
publisher: cncf-upstream
1414
offer: capi-windows
15-
sku: k8s-1dot18dot13-windows-2019
16-
version: "2020.12.11"
15+
sku: k8s-1dot18dot19-windows-2019
16+
version: "2021.05.17"

templates/test/dev/cluster-template-custom-builds-windows.yaml

+15-4
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ spec:
334334
marketplace:
335335
offer: capi-windows
336336
publisher: cncf-upstream
337-
sku: k8s-1dot18dot13-windows-2019
338-
version: 2020.12.11
337+
sku: k8s-1dot18dot19-windows-2019
338+
version: 2021.05.17
339339
osDisk:
340340
diskSizeGB: 128
341341
managedDisk:
@@ -384,10 +384,14 @@ spec:
384384
curl.exe --retry 10 --retry-delay 5 "$$ci_url/$$binary.exe" --output "c:/k/$$binary.exe"
385385
}
386386
387+
# We are using a VHD that maps to v1.18.19 so the kubeproxy image is already pulled. (pull it just in case)
388+
# Tag it to the ci version. The image knows how to use the copy locally.
389+
docker pull sigwindowstools/kube-proxy:v1.18.19-nanoserver
390+
docker tag sigwindowstools/kube-proxy:v1.18.19-nanoserver "sigwindowstools/kube-proxy:${KUBE_GIT_VERSION/+/_}-nanoserver"
391+
387392
kubeadm.exe version -o=short
388393
kubectl.exe version --client=true --short=true
389394
kubelet.exe --version
390-
#kubeproxy.exe --version
391395
path: C:/replace-k8s-binaries.ps1
392396
permissions: "0744"
393397
joinConfiguration:
@@ -1202,6 +1206,11 @@ data:
12021206
mkdir -force /host/var/lib/kube-proxy/var/run/secrets/kubernetes.io/serviceaccount
12031207
mkdir -force /host/k/kube-proxy
12041208
1209+
if($env:USE_CI_VERSION && Test-Path -Path "/host/k/kube-proxy.exe")
1210+
{
1211+
cp -force /host/k/kube-proxy.exe /k/kube-proxy/kube-proxy.exe
1212+
}
1213+
12051214
cp -force /k/kube-proxy/* /host/k/kube-proxy
12061215
cp -force /var/lib/kube-proxy/* /host/var/lib/kube-proxy
12071216
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:
12541263
valueFrom:
12551264
fieldRef:
12561265
fieldPath: status.podIP
1257-
image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION}-nanoserver
1266+
- name: USE_CI_VERSION
1267+
value: "${USE_CI_VERSION:false}"
1268+
image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION/+/_}-nanoserver
12581269
name: kube-proxy
12591270
volumeMounts:
12601271
- name: wins

templates/test/dev/custom-builds-windows/patches/custom-builds-windows.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@
1212
curl.exe --retry 10 --retry-delay 5 "$$ci_url/$$binary.exe" --output "c:/k/$$binary.exe"
1313
}
1414
15+
# We are using a VHD that maps to v1.18.19 so the kubeproxy image is already pulled. (pull it just in case)
16+
# Tag it to the ci version. The image knows how to use the copy locally.
17+
docker pull sigwindowstools/kube-proxy:v1.18.19-nanoserver
18+
docker tag sigwindowstools/kube-proxy:v1.18.19-nanoserver "sigwindowstools/kube-proxy:${KUBE_GIT_VERSION/+/_}-nanoserver"
19+
1520
kubeadm.exe version -o=short
1621
kubectl.exe version --client=true --short=true
1722
kubelet.exe --version
18-
#kubeproxy.exe --version
1923
path: C:/replace-k8s-binaries.ps1
2024
permissions: "0744"
2125
- op: add

templates/test/dev/custom-builds-windows/patches/windows-image-update.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ spec:
1212
marketplace:
1313
publisher: cncf-upstream
1414
offer: capi-windows
15-
sku: k8s-1dot18dot13-windows-2019
16-
version: "2020.12.11"
15+
sku: k8s-1dot18dot19-windows-2019
16+
version: "2021.05.17"

test/e2e/conformance_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ var _ = Describe("Conformance Tests", func() {
9999

100100
if isWindows(kubetestConfigFilePath) {
101101
flavor = flavor + "-windows"
102+
// tell windows kube-proxy to use the version supplied via CI
103+
Expect(os.Setenv("USE_CI_VERSION", "true")).To(Succeed())
102104
}
103105
}
104106

0 commit comments

Comments
 (0)