Skip to content

Commit

Permalink
e2e: bump to k8s v1.30.1
Browse files Browse the repository at this point in the history
Signed-off-by: Mikko Ylinen <[email protected]>
  • Loading branch information
mythi committed Sep 5, 2024
1 parent 72faf4b commit 0dc5123
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 35 deletions.
6 changes: 3 additions & 3 deletions install/pre-install-payload/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ RUN mkdir -p ${NODE_DESTINATION}/bin && \
FROM base as kubectl-binary-downloader

ARG ARCH
ARG KUBECTL_VERSION=v1.26.0
ARG KUBECTL_VERSION=v1.30.1

RUN \
apk --no-cache add curl && \
curl -fL --progress-bar -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl && \
chmod +x /usr/bin/kubectl
curl -fL --progress-bar https://dl.k8s.io/${KUBECTL_VERSION}/kubernetes-client-linux-${ARCH}.tar.gz | \
tar -C /usr/bin/ -x -z --strip-components 3

#### Final image

Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/ansible/group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ kubeadm_pkgs:
centos:
- conntrack
- socat
k8s_version: v1.24.0
k8s_version: v1.30.1
test_pkgs:
ubuntu:
- jq
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/ansible/install_containerd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
- name: Re-create containerd config
shell: |
mkdir -p /etc/containerd/
containerd config default > /etc/containerd/config.toml
containerd config default | sed -e 's/\(SystemdCgroup =\).*/\1 true/g' | tee /etc/containerd/config.toml
args:
executable: /bin/bash
- name: Restart containerd service
Expand Down
32 changes: 20 additions & 12 deletions tests/e2e/ansible/install_kubeadm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@
become: yes
vars:
cni_home: "/opt/cni"
cni_version: "v1.1.1"
cni_version: "v1.5.1"
flannel_home: "/opt/flannel"
flannel_version: "v0.19.1"
flannel_version: "v0.25.6"
kubeadm_cri_runtime_socket: "/run/containerd/containerd.sock"
kubeadm_conf_dir: "/etc/kubeadm"
kubelet_bin: "/usr/local/bin/kubelet"
kubelet_service_dir: "/etc/systemd/system/kubelet.service.d"
kubelet_service_file: "/etc/systemd/system/kubelet.service"
# Use 'cgroupfs' with containerd, 'systemd' with crio?
kubelet_cgroup_driver: "cgroupfs"
kubelet_cgroup_driver: "systemd"
tasks:
- name: Install kubeadm required packages
package:
Expand Down Expand Up @@ -53,17 +52,23 @@
creates: /usr/local/bin/crictl
dest: /usr/local/bin
remote_src: yes
- name: Install kube binaries
- name: Download kube binaries
get_url:
url: https://storage.googleapis.com/kubernetes-release/release/{{ k8s_version }}/bin/linux/{{ target_arch }}/{{ item }}
dest: /usr/local/bin
mode: '+x'
url: https://dl.k8s.io/{{ k8s_version }}/kubernetes-node-linux-{{ target_arch }}.tar.gz
dest: /tmp/kubernetes-node-linux.tar.gz
retries: 3
delay: 10
with_items:
- kubeadm
- kubelet
- kubectl
- name: Unpack kube binaries
unarchive:
src: /tmp/kubernetes-node-linux.tar.gz
dest: /tmp/
remote_src: yes
- name: Copy kube binaries
ansible.builtin.copy:
src: /tmp/kubernetes/node/bin/
dest: /usr/local/bin/
remote_src: yes
mode: preserve
- name: Remove zram-generator-defaults in Fedora
ansible.builtin.yum:
name: zram-generator-defaults
Expand Down Expand Up @@ -162,6 +167,9 @@
- kubeadm
- kubectl
- kubelet
- kube-log-runner
- kubectl-convert
- kube-proxy
- name: Uninstall cni
file:
path: "{{ cni_home }}"
Expand Down
18 changes: 1 addition & 17 deletions tests/e2e/ansible/templates/kubeadm.conf.j2
Original file line number Diff line number Diff line change
@@ -1,35 +1,19 @@
# Copied and modified from https://github.com/kata-containers/tests/blob/main/integration/kubernetes/kubeadm/config.yaml
#
apiVersion: kubeadm.k8s.io/v1beta3
kind: InitConfiguration
nodeRegistration:
criSocket: unix://{{ kubeadm_cri_runtime_socket }}
imagePullPolicy: IfNotPresent
kubeletExtraArgs:
allowed-unsafe-sysctls: kernel.msg*,kernel.shm.*,net.*
v: "4"
---
apiVersion: kubeadm.k8s.io/v1beta3
kind: ClusterConfiguration
kubernetesVersion: {{ k8s_version }}
networking:
dnsDomain: cluster.local
podSubnet: 10.244.0.0/16
serviceSubnet: 10.96.0.0/12
apiServer:
extraArgs:
feature-gates: PodOverhead=true
timeoutForControlPlane: 4m0s
imageRepository: k8s.gcr.io
scheduler:
extraArgs:
feature-gates: PodOverhead=true
imageRepository: registry.k8s.io
---
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
cgroupDriver: {{ kubelet_cgroup_driver }}
featureGates:
PodOverhead: true
systemReserved:
cpu: 500m
memory: 256Mi
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/cluster/up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ main() {
# Untaint the node so that pods can be scheduled on it.
for role in master control-plane; do
kubectl taint nodes "$SAFE_HOST_NAME" \
"node-role.kubernetes.io/$role:NoSchedule-"
"node-role.kubernetes.io/$role:NoSchedule-" || true
done

kubectl label node "$SAFE_HOST_NAME" node.kubernetes.io/worker=
Expand Down

0 comments on commit 0dc5123

Please sign in to comment.