From c1052dff36aaefbb6d1c28a02bc307a24ac41079 Mon Sep 17 00:00:00 2001 From: zhangzujian Date: Tue, 7 Mar 2023 15:44:29 +0800 Subject: [PATCH] update chart upgrade e2e --- .github/workflows/scheduled-e2e.yaml | 11 ++++++++++- Makefile | 5 ++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scheduled-e2e.yaml b/.github/workflows/scheduled-e2e.yaml index fcef4bee4ccf..d9a2f18ba815 100644 --- a/.github/workflows/scheduled-e2e.yaml +++ b/.github/workflows/scheduled-e2e.yaml @@ -1054,7 +1054,16 @@ jobs: run: | version=$(grep -E '^VERSION="v([0-9]+\.){2}[0-9]+"$' dist/images/install.sh | head -n1 | awk -F= '{print $2}' | tr -d '"') docker pull kubeovn/kube-ovn:$version - VERSION=$version make kind-upgrade-chart + + restart_ovs=false + v1=$(printf "${{ env.VERSION_FROM }}\\nrelease-1.11" | sort -Vr | head -n1) + v2=$(printf "${{ env.VERSION_TO }}\\nrelease-1.12" | sort -Vr | head -n1) + if [ $v1 = "release-1.11" ]; then + if [ ${{ env.VERSION_TO }} = "master" -o ${{ env.VERSION_TO }} = $v2 ]; then + restart_ovs=true + fi + fi + CHART_UPGRADE_RESTART_OVS=$restart_ovs VERSION=$version make kind-upgrade-chart - name: Run E2E env: diff --git a/Makefile b/Makefile index 8ccaa68e4805..739710feecae 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,8 @@ GOLDFLAGS = "-w -s -extldflags '-z now' -X github.com/kubeovn/kube-ovn/versions. CONTROL_PLANE_TAINTS = node-role.kubernetes.io/master node-role.kubernetes.io/control-plane +CHART_UPGRADE_RESTART_OVS=$(shell echo $${CHART_UPGRADE_RESTART_OVS:-false}) + MULTUS_IMAGE = ghcr.io/k8snetworkplumbingwg/multus-cni:stable MULTUS_YAML = https://raw.githubusercontent.com/k8snetworkplumbingwg/multus-cni/master/deployments/multus-daemonset.yml @@ -314,7 +316,8 @@ kind-upgrade-chart: kind-load-image helm upgrade kubeovn ./kubeovn-helm \ --set global.images.kubeovn.tag=$(VERSION) \ --set replicaCount=$$(echo $(OVN_DB_IPS) | awk -F ',' '{print NF}') \ - --set MASTER_NODES='$(OVN_DB_IPS)' + --set MASTER_NODES='$(OVN_DB_IPS)' \ + --set restart_ovs=$(CHART_UPGRADE_RESTART_OVS) kubectl rollout status deployment/ovn-central -n kube-system --timeout 300s kubectl rollout status deployment/kube-ovn-controller -n kube-system --timeout 300s kubectl rollout status daemonset/kube-ovn-cni -n kube-system --timeout 120s