From 2dc0201b42ce4932b1034674290d57cfad3e55f9 Mon Sep 17 00:00:00 2001 From: Gavin Xin Date: Fri, 19 Apr 2024 16:11:56 +0800 Subject: [PATCH] Upgrade CAPV image to 1.29.0 (#5891) * Update CAPV image to ubuntu22.04-1.29. * Remove kube-vip from the cluster YAML to simplify Cluster API maintenance. * Disable VM TX offloading to enhance the compatibility of the data path in CI infrastructure. Signed-off-by: Shuyang Xin --- ci/cluster-api/vsphere/templates/cluster.yaml | 54 +++---------------- ci/jenkins/test-vmc.sh | 4 +- 2 files changed, 8 insertions(+), 50 deletions(-) diff --git a/ci/cluster-api/vsphere/templates/cluster.yaml b/ci/cluster-api/vsphere/templates/cluster.yaml index 441043fcb23..5039fde4741 100644 --- a/ci/cluster-api/vsphere/templates/cluster.yaml +++ b/ci/cluster-api/vsphere/templates/cluster.yaml @@ -66,54 +66,6 @@ metadata: namespace: CLUSTERNAMESPACE spec: kubeadmConfigSpec: - files: - - content: | - apiVersion: v1 - kind: Pod - metadata: - creationTimestamp: null - name: kube-vip - namespace: kube-system - spec: - containers: - - args: - - start - env: - - name: vip_arp - value: "true" - - name: vip_leaderelection - value: "true" - - name: vip_address - value: CONTROLVIP - - name: vip_interface - value: eth0 - - name: vip_leaseduration - value: "15" - - name: vip_renewdeadline - value: "10" - - name: vip_retryperiod - value: "2" - image: ghcr.io/kube-vip/kube-vip:v0.3.5 - imagePullPolicy: IfNotPresent - name: kube-vip - resources: {} - securityContext: - capabilities: - add: - - NET_ADMIN - - SYS_TIME - volumeMounts: - - mountPath: /etc/kubernetes/admin.conf - name: kubeconfig - hostNetwork: true - volumes: - - hostPath: - path: /etc/kubernetes/admin.conf - type: FileOrCreate - name: kubeconfig - status: {} - owner: root:root - path: /etc/kubernetes/manifests/kube-vip.yaml initConfiguration: nodeRegistration: criSocket: /var/run/containerd/containerd.sock @@ -128,7 +80,10 @@ spec: - echo "127.0.0.1 localhost" >>/etc/hosts - echo "127.0.0.1 {{ ds.meta_data.hostname }}" >>/etc/hosts - echo "{{ ds.meta_data.hostname }}" >/etc/hostname + - ip addr add CONTROLVIP/32 dev eth0 - ip link set eth0 mtu 1442 + - ethtool -K eth0 tx-udp_tnl-segmentation off tx-udp_tnl-csum-segmentation off + # Work around tunnel checksum offloading issue in some problematic underlying network environments. useExperimentalRetryJoin: true users: - name: capv @@ -140,6 +95,7 @@ spec: apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: VSphereMachineTemplate name: CLUSTERNAME + # The replicas of the control plane must be set to 1 because kube-vip has been removed. replicas: 1 version: K8SVERSION --- @@ -162,6 +118,8 @@ spec: - echo "127.0.0.1 {{ ds.meta_data.hostname }}" >>/etc/hosts - echo "{{ ds.meta_data.hostname }}" >/etc/hostname - ip link set eth0 mtu 1442 + - ethtool -K eth0 tx-udp_tnl-segmentation off tx-udp_tnl-csum-segmentation off + # Work around tunnel checksum offloading issue in some problematic underlying network environments. users: - name: capv sshAuthorizedKeys: diff --git a/ci/jenkins/test-vmc.sh b/ci/jenkins/test-vmc.sh index 69f8cf42d24..3d868e5094a 100755 --- a/ci/jenkins/test-vmc.sh +++ b/ci/jenkins/test-vmc.sh @@ -189,10 +189,10 @@ function release_static_ip() { function setup_cluster() { export KUBECONFIG=$KUBECONFIG_PATH if [ -z $K8S_VERSION ]; then - export K8S_VERSION=v1.28.0 + export K8S_VERSION=v1.29.0 fi if [ -z $TEST_OS ]; then - export TEST_OS=ubuntu-2004 + export TEST_OS=ubuntu-2204 fi export OVA_TEMPLATE_NAME=${TEST_OS}-kube-${K8S_VERSION} rm -rf ${GIT_CHECKOUT_DIR}/jenkins || true