From 2bdde709a878c15c8d9014a368282434cf939434 Mon Sep 17 00:00:00 2001 From: "tao.yang" Date: Sun, 22 Sep 2024 12:06:32 +0800 Subject: [PATCH] add kindest/node:1.31.0 for e2e Signed-off-by: ty-dc --- .github/workflows/auto-diff-k8s-ci.yaml | 16 +++------------- test/Makefile | 6 ++++++ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/auto-diff-k8s-ci.yaml b/.github/workflows/auto-diff-k8s-ci.yaml index 71e6d5b16..9feba533c 100644 --- a/.github/workflows/auto-diff-k8s-ci.yaml +++ b/.github/workflows/auto-diff-k8s-ci.yaml @@ -9,9 +9,6 @@ env: PR_REVIWER: weizhoublue, ty-dc # The range of K8s versions that matrix tests expect to run. All distributions larger than it will be picked to run. MINIMUM_K8S_VERSION: v1.21 - # TODO(ty-dc), refer: https://github.com/spidernet-io/spiderpool/issues/3937 - # Currently using kind/node v1.31, it is not possible to setup kind cluster - PENDING_K8S_VERSION: v1.31 K8S_MATRIX_FILE_PATH: .github/workflows/auto-diff-k8s-ci.yaml on: @@ -139,15 +136,8 @@ jobs: git_status=$(git status --porcelain) echo "git status: ${git_status}" if [[ -n "$git_status" ]]; then - git_diff_version=$(git diff ${{ env.K8S_MATRIX_FILE_PATH }} | grep ${{ env.PENDING_K8S_VERSION }}) - # Avoid submitting PRs every day after checking for changes. - if [[ -n "$git_diff_version" ]]; then - echo "SKIP_CREATE_PR=true" >> $GITHUB_ENV - echo "The .github/workflows/auto-diff-k8s-ci.yaml of Spiderpool has changed." - else - echo "SKIP_CREATE_PR=false" >> $GITHUB_ENV - echo "The .github/workflows/auto-diff-k8s-ci.yaml of Spiderpool has changed." - fi + echo "The .github/workflows/auto-diff-k8s-ci.yaml of Spiderpool has changed." + echo "SKIP_CREATE_PR=false" >> $GITHUB_ENV else echo "The .github/workflows/auto-diff-k8s-ci.yaml of Spiderpool has not changed." echo "SKIP_CREATE_PR=true" >> $GITHUB_ENV @@ -186,7 +176,7 @@ jobs: matrix: # Synchronise with the latest releases of each version # If a new version of kind/node is released, it will be updated automatically. - version: [v1.28.13, v1.29.8, v1.30.4, v1.27.16, v1.26.15, v1.25.16, v1.23.17, v1.24.17, v1.22.17] + version: [v1.28.13, v1.29.8, v1.30.4, v1.27.16, v1.26.15, v1.25.16, v1.31.0, v1.23.17, v1.24.17, v1.22.17] needs: [call_build_ci_image, get_ref, call_release_chart] uses: ./.github/workflows/e2e-init.yaml with: diff --git a/test/Makefile b/test/Makefile index 7c7ac03fe..a082f3563 100644 --- a/test/Makefile +++ b/test/Makefile @@ -159,8 +159,14 @@ setup_kind: echo "the following features are only fully supported in versions higher than v1.29.0." ; \ sed -i '$$ a\runtimeConfig: ' $${NEW_KIND_YAML} ; \ sed -i '$$ a\ api/alpha: "true"' $${NEW_KIND_YAML} ; \ + if [ $$(echo -e "$(E2E_KIND_IMAGE_TAG)\nv1.31.0" | sort -V | tail -n1) == "$(E2E_KIND_IMAGE_TAG)" ]; then \ + sed -i '$$ a\ api/beta: "true"' $${NEW_KIND_YAML} ; \ + fi ; \ sed -i '$$ a\featureGates: ' $${NEW_KIND_YAML} ; \ sed -i '$$ a\ MultiCIDRServiceAllocator: true' $${NEW_KIND_YAML} ; \ + if [ $$(echo -e "$(E2E_KIND_IMAGE_TAG)\nv1.31.0" | sort -V | tail -n1) == "$(E2E_KIND_IMAGE_TAG)" ]; then \ + sed -i '$$ a\ DisableAllocatorDualWrite: true' $${NEW_KIND_YAML} ; \ + fi ; \ if [ "${E2E_SPIDERPOOL_ENABLE_DRA}" == "true" ]; then \ sed -i '$$ a\ DynamicResourceAllocation: true' $${NEW_KIND_YAML} ; \ printf 'containerdConfigPatches: \n# Enable CDI as described in https://tags.cncf.io/container-device-interface#containerd-configuration\n- |-\n [plugins."io.containerd.grpc.v1.cri"]\n enable_cdi = true\n ' >> $${NEW_KIND_YAML} ; \