Skip to content

Commit

Permalink
update kube-proxy to the correct version
Browse files Browse the repository at this point in the history
  • Loading branch information
jsturtevant committed May 25, 2021
1 parent 0cda9df commit ce2e39f
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 18 deletions.
9 changes: 8 additions & 1 deletion templates/addons/windows/kube-proxy-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down Expand Up @@ -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
Expand Down
19 changes: 15 additions & 4 deletions templates/test/ci/cluster-template-prow-ci-version-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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?
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion templates/test/ci/cluster-template-prow-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ spec:
marketplace:
publisher: cncf-upstream
offer: capi-windows
sku: k8s-1dot18dot13-windows-2019
version: "2020.12.11"
sku: k8s-1dot18dot19-windows-2019
version: "2021.05.17"
19 changes: 15 additions & 4 deletions templates/test/dev/cluster-template-custom-builds-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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?
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ spec:
marketplace:
publisher: cncf-upstream
offer: capi-windows
sku: k8s-1dot18dot13-windows-2019
version: "2020.12.11"
sku: k8s-1dot18dot19-windows-2019
version: "2021.05.17"
2 changes: 2 additions & 0 deletions test/e2e/conformance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}

Expand Down

0 comments on commit ce2e39f

Please sign in to comment.