Skip to content

Commit

Permalink
Merge pull request #2335 from marosset/cluster-template-prow-custom-c…
Browse files Browse the repository at this point in the history
…ontainerd

decoupling using K8s ci binaries and different versions of containerd for ci windows templates
  • Loading branch information
k8s-ci-robot committed Jun 8, 2022
2 parents b6f33a6 + 22ba1c9 commit efc37fd
Show file tree
Hide file tree
Showing 14 changed files with 145 additions and 105 deletions.

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

32 changes: 20 additions & 12 deletions templates/test/ci/cluster-template-prow-ci-version.yaml

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

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

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

20 changes: 20 additions & 0 deletions templates/test/ci/cluster-template-prow.yaml

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

@@ -0,0 +1,26 @@
- op: add
path: /spec/template/spec/files/-
value:
content: |
$ErrorActionPreference = 'Stop'
$$CONTAINERD_URL="${WINDOWS_CONTAINERD_URL}"
if($$CONTAINERD_URL -ne ""){
# Kubelet service depends on contianerd service so make a best effort attempt to stop it
Stop-Service kubelet -Force -ErrorAction SilentlyContinue
Stop-Service containerd -Force
echo "downloading containerd: $$CONTAINERD_URL"
curl.exe --retry 10 --retry-delay 5 -L "$$CONTAINERD_URL" --output "c:/k/containerd.tar.gz"
tar.exe -zxvf c:/k/containerd.tar.gz -C "c:/Program Files/containerd" --strip-components 1
Start-Service containerd
}
containerd.exe --version
containerd-shim-runhcs-v1.exe --version
path: C:/replace-containerd.ps1
permissions: "0744"
- op: add
path: /spec/template/spec/preKubeadmCommands/-
value:
powershell C:/replace-containerd.ps1
2 changes: 1 addition & 1 deletion templates/test/ci/prow-ci-version/kustomization.yaml
Expand Up @@ -27,7 +27,7 @@ patches:
kind: KubeadmConfigTemplate
name: .*-md-win
namespace: default
path: patches/kubeadm-bootstrap-windows.yaml
path: patches/kubeadm-bootstrap-windows-k8s-ci-binaries.yaml
- target:
group: controlplane.cluster.x-k8s.io
version: v1beta1
Expand Down
Expand Up @@ -18,16 +18,6 @@
}
}
$$CONTAINERD_URL="${WINDOWS_CONTAINERD_URL}"
if($$CONTAINERD_URL -ne ""){
Stop-Service containerd -Force
echo "downloading containerd: $$CONTAINERD_URL"
curl.exe --retry 10 --retry-delay 5 -L "$$CONTAINERD_URL" --output "c:/k/containerd.tar.gz"
tar.exe -zxvf c:/k/containerd.tar.gz -C "c:/Program Files/containerd" --strip-components 1
Start-Service containerd
}
# Tag it to the ci version. The image knows how to use the copy locally with the configmap
# that is applied at at this stage (windows-kubeproxy-ci.yaml)
ctr.exe -n k8s.io images pull docker.io/sigwindowstools/kube-proxy:v1.23.1-calico-hostprocess
Expand All @@ -37,8 +27,6 @@
kubectl.exe version --client=true --short=true
kubelet.exe --version
kube-proxy.exe --version
containerd.exe --version
containerd-shim-runhcs-v1.exe --version
path: C:/replace-ci-binaries.ps1
permissions: "0744"
- op: add
Expand Down
Expand Up @@ -23,7 +23,7 @@ patches:
kind: KubeadmConfig
name: .*-mp-win
namespace: default
path: patches/kubeadm-bootstrap-windows.yaml
path: patches/kubeadm-bootstrap-windows-k8s-ci-binaries.yaml
configMapGenerator:
- name: cni-${CLUSTER_NAME}-calico
behavior: merge
Expand Down
Expand Up @@ -2,6 +2,8 @@
path: /spec/files/-
value:
content: |
$ErrorActionPreference = 'Stop'
Stop-Service kubelet -Force
$$CI_VERSION="${CI_VERSION}"
Expand Down
7 changes: 7 additions & 0 deletions templates/test/ci/prow/kustomization.yaml
Expand Up @@ -32,6 +32,13 @@ patches:
name: .*-md-win
namespace: default
path: ../patches/windows-tmp-folder.yaml
- target:
group: bootstrap.cluster.x-k8s.io
version: v1beta1
kind: KubeadmConfigTemplate
name: .*-md-win
namespace: default
path: ../patches/kubeadm-bootstrap-windows-containerd.yaml
configMapGenerator:
- name: cni-${CLUSTER_NAME}-calico
files:
Expand Down
37 changes: 25 additions & 12 deletions templates/test/dev/cluster-template-custom-builds.yaml

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

2 changes: 1 addition & 1 deletion templates/test/dev/custom-builds/kustomization.yaml
Expand Up @@ -29,7 +29,7 @@ patches:
kind: KubeadmConfigTemplate
name: .*-md-win
namespace: default
path: patches/kubeadm-bootstrap-windows.yaml
path: ../../ci/prow-ci-version/patches/kubeadm-bootstrap-windows-k8s-ci-binaries.yaml
configMapGenerator:
- name: cni-${CLUSTER_NAME}-calico
behavior: merge
Expand Down

0 comments on commit efc37fd

Please sign in to comment.