diff --git a/.github/workflows/build-arm64-image.yaml b/.github/workflows/build-arm64-image.yaml deleted file mode 100644 index 3ba20ab9538a..000000000000 --- a/.github/workflows/build-arm64-image.yaml +++ /dev/null @@ -1,76 +0,0 @@ -name: Build arm64 Image -on: - pull_request: - branches: - - master - paths-ignore: - - 'docs/**' - - '**.md' - push: - branches: - - master - - release-* - paths-ignore: - - 'docs/**' - - '**.md' - -concurrency: - group: "${{ github.workflow }}-${{ github.ref }}" - cancel-in-progress: true - -env: - GO_VERSION: '' - -jobs: - build: - name: Build arm64 - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: docker/setup-buildx-action@v3 - - uses: docker/setup-qemu-action@v3 - with: - platforms: arm64 - - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go Cache - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-${{ env.GO_FULL_VER }}-arm64-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-${{ env.GO_FULL_VER }}-arm64- - - - name: Build - run: make release-arm - - - name: Push - if: github.ref_name == github.event.repository.default_branch || startsWith(github.ref_name, 'release-') - env: - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - COMMIT: ${{ github.sha }} - run: | - TAG=$(cat VERSION) - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker tag kubeovn/kube-ovn:$TAG kubeovn/kube-ovn:$TAG-arm - docker tag kubeovn/kube-ovn:$TAG kubeovn/kube-ovn-dev:$COMMIT-arm - docker tag kubeovn/kube-ovn:$TAG-debug kubeovn/kube-ovn:$TAG-debug-arm - docker tag kubeovn/vpc-nat-gateway:$TAG kubeovn/vpc-nat-gateway:$TAG-arm - docker tag kubeovn/vpc-nat-gateway:$TAG kubeovn/vpc-nat-gateway-dev:$COMMIT-arm - docker images - docker push kubeovn/kube-ovn:$TAG-arm - docker push kubeovn/kube-ovn:$TAG-debug-arm - docker push kubeovn/kube-ovn-dev:$COMMIT-arm - docker push kubeovn/vpc-nat-gateway:$TAG-arm - docker push kubeovn/vpc-nat-gateway-dev:$COMMIT-arm diff --git a/.github/workflows/build-kube-ovn-base-dpdk.yaml b/.github/workflows/build-kube-ovn-base-dpdk.yaml deleted file mode 100644 index 626bf736e541..000000000000 --- a/.github/workflows/build-kube-ovn-base-dpdk.yaml +++ /dev/null @@ -1,91 +0,0 @@ -name: Build Base DPDK -on: - workflow_dispatch: - inputs: - branch: - description: "Select branch" - required: true - type: choice - options: - - master - - release-1.12 - - release-1.12-mc - schedule: - - cron: "20 19 * * *" - -jobs: - build-amd64: - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - - release-1.12-mc - name: Build AMD64 - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - with: - ref: ${{ matrix.branch }} - - - uses: docker/setup-buildx-action@v3 - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - - - name: Build - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - run: | - make base-amd64-dpdk - make base-tar-amd64-dpdk - - - name: Upload image to artifact - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - uses: actions/upload-artifact@v4 - with: - name: image-amd64-dpdk-${{ matrix.branch }} - path: image-amd64-dpdk.tar - retention-days: 7 - - push: - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - - release-1.12-mc - needs: - - build-amd64 - name: push - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - with: - ref: ${{ matrix.branch }} - - - name: Download image - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - uses: actions/download-artifact@v4 - with: - name: image-amd64-dpdk-${{ matrix.branch }} - - - name: Load Image - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - run: | - docker load --input image-amd64-dpdk.tar - - - name: Push - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - env: - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - COMMIT: ${{ github.sha }} - run: | - cat VERSION - TAG=$(cat VERSION) - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker images - docker tag kubeovn/kube-ovn-base:$TAG-amd64-dpdk kubeovn/kube-ovn-base:$TAG-dpdk - docker push kubeovn/kube-ovn-base:$TAG-dpdk diff --git a/.github/workflows/build-kube-ovn-base.yaml b/.github/workflows/build-kube-ovn-base.yaml deleted file mode 100644 index 54620cbbc027..000000000000 --- a/.github/workflows/build-kube-ovn-base.yaml +++ /dev/null @@ -1,157 +0,0 @@ -name: Build Base -on: - workflow_dispatch: - inputs: - branch: - description: "Select branch" - required: true - type: choice - options: - - master - - release-1.12 - - release-1.11 - - release-1.9 - - release-1.12-mc - schedule: - - cron: "20 19 * * *" - -jobs: - build-amd64: - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - - release-1.11 - - release-1.9 - - release-1.12-mc - name: Build AMD64 - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - with: - ref: ${{ matrix.branch }} - - - uses: docker/setup-buildx-action@v3 - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - - - name: Build - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - run: | - make base-amd64 - make base-tar-amd64 - - - name: Upload image to artifact - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - uses: actions/upload-artifact@v4 - with: - name: image-amd64-${{ matrix.branch }} - path: image-amd64.tar - retention-days: 7 - - build-arm64: - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - - release-1.11 - - release-1.9 - - release-1.12-mc - name: Build ARM64 - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - with: - ref: ${{ matrix.branch }} - - - uses: docker/setup-buildx-action@v3 - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - - - uses: docker/setup-qemu-action@v3 - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - with: - platforms: arm64 - - - name: Build - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - run: | - make base-arm64 || make base-arm64 - make base-tar-arm64 - - - name: Upload image to artifact - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - uses: actions/upload-artifact@v4 - with: - name: image-arm64-${{ matrix.branch }} - path: image-arm64.tar - retention-days: 7 - - push: - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - - release-1.11 - - release-1.9 - - release-1.12-mc - needs: - - build-arm64 - - build-amd64 - name: push - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - with: - ref: ${{ matrix.branch }} - - - name: Download image - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - uses: actions/download-artifact@v4 - with: - name: image-amd64-${{ matrix.branch }} - - - name: Download image - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - uses: actions/download-artifact@v4 - with: - name: image-arm64-${{ matrix.branch }} - - - name: Load Image - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - run: | - docker load --input image-amd64.tar - docker load --input image-arm64.tar - - - name: Push - if: (github.event.inputs.branch || matrix.branch) == matrix.branch - env: - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - COMMIT: ${{ github.sha }} - run: | - cat VERSION - TAG=$(cat VERSION) - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker images - docker push kubeovn/kube-ovn-base:$TAG-amd64 - docker push kubeovn/kube-ovn-base:$TAG-arm64 - docker manifest create kubeovn/kube-ovn-base:$TAG kubeovn/kube-ovn-base:$TAG-amd64 kubeovn/kube-ovn-base:$TAG-arm64 - docker manifest push kubeovn/kube-ovn-base:$TAG - - if [ "${{ matrix.branch }}" = "master" -o "`printf '${{ matrix.branch }}\nrelease-1.11' | sort -Vr | head -n1`" = "${{ matrix.branch }}" ]; then - docker push kubeovn/kube-ovn-base:$TAG-debug-amd64 - docker push kubeovn/kube-ovn-base:$TAG-debug-arm64 - docker manifest create kubeovn/kube-ovn-base:$TAG-debug kubeovn/kube-ovn-base:$TAG-debug-amd64 kubeovn/kube-ovn-base:$TAG-debug-arm64 - docker manifest push kubeovn/kube-ovn-base:$TAG-debug - fi - if [ "${{ matrix.branch }}" = "master" -o "`printf '${{ matrix.branch }}\nrelease-1.13' | sort -Vr | head -n1`" = "${{ matrix.branch }}" ]; then - docker push kubeovn/kube-ovn-base:$TAG-amd64-legacy - fi diff --git a/.github/workflows/build-kube-ovn-test.yaml b/.github/workflows/build-kube-ovn-test.yaml deleted file mode 100644 index 3315745710ce..000000000000 --- a/.github/workflows/build-kube-ovn-test.yaml +++ /dev/null @@ -1,31 +0,0 @@ -name: Build Test -on: workflow_dispatch - -env: - GO_VERSION: '' - -jobs: - build: - name: Build Test - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: docker/setup-buildx-action@v3 - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: go.mod - check-latest: true - cache: false - - - name: Build - run: make image-test - - - name: Push - env: - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - COMMIT: ${{ github.sha }} - run: | - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker push kubeovn/test:$(cat VERSION) diff --git a/.github/workflows/build-windows.yaml b/.github/workflows/build-windows.yaml deleted file mode 100644 index 6ffc33d297cc..000000000000 --- a/.github/workflows/build-windows.yaml +++ /dev/null @@ -1,278 +0,0 @@ -name: Build Windows - -on: - workflow_dispatch: - release: - pull_request: - branches: - - master - paths-ignore: - - 'docs/**' - - '**.md' - push: - branches: - - master - - release-* - paths-ignore: - - 'docs/**' - - '**.md' - -concurrency: - group: "${{ github.workflow }}-${{ github.ref }}" - cancel-in-progress: true - -env: - GO_VERSION: '' - GOSEC_VERSION: '2.20.0' - -jobs: - filter: - name: Path Filter - runs-on: ubuntu-22.04 - outputs: - build-ovs-ovn: ${{ steps.filter.outputs.windows-ovs-ovn }} - build-kube-ovn: ${{ steps.filter.outputs.windows-kube-ovn }} - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: go.mod - check-latest: true - cache: false - - - name: Generate path filter - env: - GOOS: windows - run: | - filter=".github/path-filters.yaml" - workflow=$(echo ${{ github.workflow_ref }} | awk -F@ '{print $1}' | sed 's@^${{ github.repository }}/@@') - cat > $filter < nul && set _vs_path=!_vs_path!;%%~d - ) - SET PATH="%_vs_path%;%PATH%" - C:\msys64\usr\bin\bash.exe -lc "pacman -S --noconfirm python-pip libtool autoconf automake-wrapper" - C:\msys64\usr\bin\bash.exe -lc "python3 -m pip install pypiwin32" - C:\msys64\usr\bin\bash.exe -lc "rm -f `which link`" - C:\msys64\usr\bin\bash.exe -lc "cd '%_ovs_dir%' && ./boot.sh" - C:\msys64\usr\bin\bash.exe -lc "cd '%_ovs_dir%' && ./configure CC=./build-aux/cccl LD='`which link`' LIBS='-lws2_32 -lShlwapi -liphlpapi -lwbemuuid -lole32 -loleaut32' --prefix='C:/openvswitch/usr' --localstatedir='C:/openvswitch/var' --sysconfdir='C:/openvswitch/etc' --with-pthread='%_p4w_dir%' --disable-ssl" - C:\msys64\usr\bin\bash.exe -lc "cd '%_ovs_dir%' && make -j" - C:\msys64\usr\bin\bash.exe -lc "cd '%_ovs_dir%' && make windows_installer" - C:\msys64\usr\bin\bash.exe -lc "cd '%_ovn_dir%' && ./boot.sh" - C:\msys64\usr\bin\bash.exe -lc "cd '%_ovn_dir%' && ./configure CC=./build-aux/cccl LD='`which link`' LIBS='-lws2_32 -lShlwapi -liphlpapi -lwbemuuid -lole32 -loleaut32' --prefix='C:/ovn/usr' --localstatedir='C:/ovn/var' --sysconfdir='C:/ovn/etc' --with-pthread='%_p4w_dir%' --disable-ssl --with-ovs-source='../ovs'" - C:\msys64\usr\bin\bash.exe -lc "cd '%_ovn_dir%' && make -j" - C:\msys64\usr\bin\bash.exe -lc "cd '%_ovn_dir%' && make install" - - - name: Upload OVS - uses: actions/upload-artifact@v4 - with: - name: ovs-win64 - path: ovs\windows\ovs-windows-installer\bin\x64\Release\OpenvSwitch.msi - - - name: Upload OVN - uses: actions/upload-artifact@v4 - with: - name: ovn-win64 - path: C:\ovn - - build-kube-ovn: - name: Build Kube-OVN - needs: filter - runs-on: windows-2019 - if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' || needs.filter.outputs.build-kube-ovn == 'true' - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: | - $goVersion = (go env GOVERSION) - $entry = [string]::Format("GO_FULL_VER={0}", $goVersion) - Add-Content -Path $env:GITHUB_ENV -Value $entry - - - name: Go Cache - uses: actions/cache@v4 - with: - path: | - ~\AppData\Local\go-build - ~\go\pkg\mod - key: ${{ runner.os }}-${{ env.GO_FULL_VER }}-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-${{ env.GO_FULL_VER }}- - - - name: Install gosec - run: | - Invoke-WebRequest https://github.com/securego/gosec/releases/download/v${{ env.GOSEC_VERSION }}/gosec_${{ env.GOSEC_VERSION }}_windows_amd64.tar.gz -OutFile gosec.tar.gz - mkdir gosec - tar -xzvf gosec.tar.gz -C gosec - Copy-Item gosec/gosec.exe -Destination C:\Windows\system32 - - - name: Build - run: | - go mod tidy - make lint-windows - make build-go-windows - - - name: Upload Binaries - uses: actions/upload-artifact@v4 - with: - name: kube-ovn-bin - path: | - dist/windows/kube-ovn.exe - dist/windows/kube-ovn-daemon.exe - - package: - name: Pack Windows Files - needs: - - build-ovs-and-ovn - - build-kube-ovn - runs-on: windows-2019 - steps: - - uses: actions/checkout@v4 - - - name: Download Kube-OVN binaries - uses: actions/download-artifact@v4 - with: - name: kube-ovn-bin - path: dist/windows - - - name: Download OVS - uses: actions/download-artifact@v4 - with: - name: ovs-win64 - path: dist/windows - - - name: Download OVN - uses: actions/download-artifact@v4 - with: - name: ovn-win64 - path: dist/windows/ovn - - - name: Pack files - working-directory: dist/windows - run: | - # ovn - New-Item -ItemType directory -Path ovn/etc - Copy-Item ovn-controller.conf -Destination ovn/etc - Copy-Item start-ovn-controller.ps1 -Destination ovn - # kube-ovn - New-Item -ItemType directory -Path "kube-ovn/etc", "kube-ovn/bin" - Copy-Item 01-kube-ovn.conflist -Destination kube-ovn - Copy-Item kube-ovn.conf -Destination kube-ovn/etc - Copy-Item start-kube-ovn.ps1 -Destination kube-ovn/bin - Copy-Item kube-ovn.exe -Destination kube-ovn/bin - Copy-Item kube-ovn-daemon.exe -Destination kube-ovn/bin - - - name: Upload package - uses: actions/upload-artifact@v4 - with: - name: kube-ovn-win64 - path: | - dist/windows/OpenvSwitch.msi - dist/windows/ovn - dist/windows/kube-ovn - dist/windows/install.ps1 diff --git a/.github/workflows/build-x86-image.yaml b/.github/workflows/build-x86-image.yaml index 8ae6881744b8..0af71c0891ce 100644 --- a/.github/workflows/build-x86-image.yaml +++ b/.github/workflows/build-x86-image.yaml @@ -233,6 +233,7 @@ jobs: name: kube-ovn-dpdk path: kube-ovn-dpdk.tar + build-vpc-nat-gateway: name: Build vpc-nat-gateway runs-on: ubuntu-22.04 @@ -338,58 +339,28 @@ jobs: if: steps.lookup-go-cache.outputs.cache-hit != 'true' working-directory: ${{ env.E2E_DIR }} - netpol-path-filter: - name: Network Policy Path Filter - if: github.event_name != 'pull_request' - runs-on: ubuntu-22.04 - outputs: - test-netpol: ${{ steps.filter.outputs.kube-ovn-controller }} - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: go.mod - check-latest: true - cache: false - - - name: Generate path filter - run: | - filter=".github/path-filters.yaml" - cat > $filter <> "$GITHUB_ENV" fi - - name: Remove DNS search domain - run: | - sudo sed -i '/^search/d' /etc/resolv.conf - sudo systemctl restart docker - - uses: actions/setup-go@v5 with: go-version: ${{ env.GO_VERSION || '' }} @@ -457,2273 +423,78 @@ jobs: working-directory: ${{ env.E2E_DIR }} run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - name: Download image + - name: Download kube-ovn image uses: actions/download-artifact@v4 with: name: kube-ovn - - name: Load image - run: docker load --input kube-ovn.tar - - - name: Export debug image tag - run: echo "DEBUG_TAG='$(cat VERSION)-debug'" >> "$GITHUB_ENV" - - - name: Create kind cluster - run: | - sudo pip3 install jinjanator - sudo --preserve-env=CI PATH=~/.local/bin:$PATH make kind-init-${{ matrix.ip-family }} - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - id: install - env: - VERSION: ${{ env.DEBUG_TAG }} - DEBUG_WRAPPER: valgrind - run: make kind-install-${{ matrix.mode }}-${{ matrix.ip-family }} - - - name: Run E2E - id: e2e - working-directory: ${{ env.E2E_DIR }} - env: - E2E_BRANCH: ${{ github.base_ref || github.ref_name }} - E2E_IP_FAMILY: ${{ matrix.ip-family }} - E2E_NETWORK_MODE: ${{ matrix.mode }} - run: make k8s-conformance-e2e - - - name: Collect k8s events - if: failure() && steps.e2e.conclusion == 'failure' - run: | - kubectl get events -A -o yaml > k8s-conformance-e2e-${{ matrix.ip-family }}-${{ matrix.mode }}-events.yaml - tar zcf k8s-conformance-e2e-${{ matrix.ip-family }}-${{ matrix.mode }}-events.tar.gz k8s-conformance-e2e-${{ matrix.ip-family }}-${{ matrix.mode }}-events.yaml - - - name: Upload k8s events - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: k8s-conformance-e2e-${{ matrix.ip-family }}-${{ matrix.mode }}-events - path: k8s-conformance-e2e-${{ matrix.ip-family }}-${{ matrix.mode }}-events.tar.gz - - - name: Collect apiserver audit logs - if: failure() && steps.e2e.conclusion == 'failure' - run: | - docker cp kube-ovn-control-plane:/var/log/kubernetes/kube-apiserver-audit.log . - tar zcf k8s-conformance-e2e-${{ matrix.ip-family }}-${{ matrix.mode }}-audit-log.tar.gz kube-apiserver-audit.log - - - name: Upload apiserver audit logs - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: k8s-conformance-e2e-${{ matrix.ip-family }}-${{ matrix.mode }}-audit-log - path: k8s-conformance-e2e-${{ matrix.ip-family }}-${{ matrix.mode }}-audit-log.tar.gz - - - name: kubectl ko log - if: failure() && steps.e2e.conclusion == 'failure' - run: | - make kubectl-ko-log - mv kubectl-ko-log.tar.gz k8s-conformance-e2e-${{ matrix.ip-family }}-${{ matrix.mode }}-ko-log.tar.gz - - - name: upload kubectl ko log - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: k8s-conformance-e2e-${{ matrix.ip-family }}-${{ matrix.mode }}-ko-log - path: k8s-conformance-e2e-${{ matrix.ip-family }}-${{ matrix.mode }}-ko-log.tar.gz - - - name: Check kube ovn pod restarts - if: ${{ success() || (failure() && (steps.install.conclusion == 'failure' || steps.e2e.conclusion == 'failure')) }} - run: make check-kube-ovn-pod-restarts - - - name: Check valgrind result - run: | - kubectl -n kube-system rollout restart ds ovs-ovn - kubectl -n kube-system rollout status ds ovs-ovn - sleep 10 - kubectl -n kube-system rollout restart deploy ovn-central - kubectl -n kube-system rollout status deploy ovn-central - while true; do - if [ $(kubectl -n kube-system get pod -l app=ovs -o name | wc -l) -eq $(kubectl get node -o name | wc -l) ]; then - break - fi - sleep 1 - done - kubectl ko log ovn - kubectl ko log ovs - - for daemon in ovsdb-nb ovsdb-sb ovn-northd ovn-controller ovsdb-server ovs-vswitchd; do - echo "Checking if valgrind log file for $daemon exists..." - find kubectl-ko-log -type f -name "$daemon.valgrind.log.[[:digit:]]*" -exec false {} + && exit 1 - done - - find kubectl-ko-log -type f -name '*.valgrind.log.*' | while read f; do - if grep -qw 'definitely lost' "$f"; then - echo "Memory leak detected in $(basename $f | awk -F. '{print $1}')." - echo $f - cat "$f" - exit 1 - fi; - done - - k8s-netpol-e2e: - name: Kubernetes Network Policy E2E - if: | - always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && - (needs.netpol-path-filter.outputs.test-netpol == 1 || contains(github.event.pull_request.labels.*.name, 'network policy')) - needs: - - build-kube-ovn - - build-e2e-binaries - - netpol-path-filter - runs-on: ubuntu-22.04 - timeout-minutes: 90 - strategy: - fail-fast: false - matrix: - ip-family: - - ipv4 - - ipv6 - - dual - steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - - uses: actions/checkout@v4 - - - name: Create the default branch directory - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - run: mkdir -p test/e2e/source - - - name: Check out the default branch - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - uses: actions/checkout@v4 - with: - ref: ${{ github.event.repository.default_branch }} - fetch-depth: 1 - path: test/e2e/source - - - name: Export E2E directory - run: | - if [ '${{ github.base_ref || github.ref_name }}' = '${{ github.event.repository.default_branch }}' ]; then - echo "E2E_DIR=." >> "$GITHUB_ENV" - else - echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV" - fi - - - name: Remove DNS search domain - run: | - sudo sed -i '/^search/d' /etc/resolv.conf - sudo systemctl restart docker - - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: ${{ env.E2E_DIR }}/go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache/restore@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Download image + - name: Download vpc-nat-gateway image uses: actions/download-artifact@v4 with: - name: kube-ovn - - - name: Load image - run: docker load --input kube-ovn.tar + name: vpc-nat-gateway - - name: Export debug image tag - run: echo "DEBUG_TAG='$(cat VERSION)-debug'" >> "$GITHUB_ENV" + - name: Load images + run: | + docker load -i kube-ovn.tar + docker load -i vpc-nat-gateway.tar - name: Create kind cluster run: | sudo pip3 install jinjanator - sudo --preserve-env=CI PATH=~/.local/bin:$PATH make kind-init-${{ matrix.ip-family }} + sudo --preserve-env=CI PATH=~/.local/bin:$PATH make kind-init sudo cp -r /root/.kube/ ~/.kube/ sudo chown -R $(id -un). ~/.kube/ - - name: Install Kube-OVN + - name: Install Multus and Kube-OVN id: install - env: - VERSION: ${{ env.DEBUG_TAG }} - DEBUG_WRAPPER: valgrind - run: make kind-install-${{ matrix.ip-family }} + run: make kind-install-lb-svc - name: Run E2E id: e2e working-directory: ${{ env.E2E_DIR }} - run: make k8s-netpol-e2e + env: + E2E_BRANCH: ${{ github.base_ref || github.ref_name }} + run: make kube-ovn-lb-svc-conformance-e2e - name: Collect k8s events if: failure() && steps.e2e.conclusion == 'failure' run: | - kubectl get events -A -o yaml > k8s-netpol-e2e-${{ matrix.ip-family }}-events.yaml - tar zcf k8s-netpol-e2e-${{ matrix.ip-family }}-events.tar.gz k8s-netpol-e2e-${{ matrix.ip-family }}-events.yaml + kubectl get events -A -o yaml > lb-svc-e2e-events.yaml + tar zcf lb-svc-e2e-events.tar.gz lb-svc-e2e-events.yaml - name: Upload k8s events uses: actions/upload-artifact@v4 if: failure() && steps.e2e.conclusion == 'failure' with: - name: k8s-netpol-e2e-${{ matrix.ip-family }}-events - path: k8s-netpol-e2e-${{ matrix.ip-family }}-events.tar.gz + name: lb-svc-e2e-${{ matrix.index }}-events + path: lb-svc-e2e-events.tar.gz - name: Collect apiserver audit logs if: failure() && steps.e2e.conclusion == 'failure' run: | docker cp kube-ovn-control-plane:/var/log/kubernetes/kube-apiserver-audit.log . - tar zcf k8s-netpol-e2e-${{ matrix.ip-family }}-audit-log.tar.gz kube-apiserver-audit.log + tar zcf lb-svc-e2e-audit-log.tar.gz kube-apiserver-audit.log - name: Upload apiserver audit logs uses: actions/upload-artifact@v4 if: failure() && steps.e2e.conclusion == 'failure' with: - name: k8s-netpol-e2e-${{ matrix.ip-family }}-audit-log - path: k8s-netpol-e2e-${{ matrix.ip-family }}-audit-log.tar.gz + name: lb-svc-e2e-${{ matrix.index }}-audit-log + path: lb-svc-e2e-audit-log.tar.gz - name: kubectl ko log if: failure() && steps.e2e.conclusion == 'failure' run: | make kubectl-ko-log - mv kubectl-ko-log.tar.gz k8s-netpol-e2e-${{ matrix.ip-family }}-ko-log.tar.gz + mv kubectl-ko-log.tar.gz lb-svc-e2e-ko-log.tar.gz - name: upload kubectl ko log uses: actions/upload-artifact@v4 if: failure() && steps.e2e.conclusion == 'failure' with: - name: k8s-netpol-e2e-${{ matrix.ip-family }}-ko-log - path: k8s-netpol-e2e-${{ matrix.ip-family }}-ko-log.tar.gz + name: lb-svc-e2e-${{ matrix.index }}-ko-log + path: lb-svc-e2e-ko-log.tar.gz - name: Check kube ovn pod restarts if: ${{ success() || (failure() && (steps.install.conclusion == 'failure' || steps.e2e.conclusion == 'failure')) }} run: make check-kube-ovn-pod-restarts - - - name: Check valgrind result - run: | - kubectl -n kube-system rollout restart ds ovs-ovn - kubectl -n kube-system rollout status ds ovs-ovn - sleep 10 - kubectl -n kube-system rollout restart deploy ovn-central - kubectl -n kube-system rollout status deploy ovn-central - while true; do - if [ $(kubectl -n kube-system get pod -l app=ovs -o name | wc -l) -eq $(kubectl get node -o name | wc -l) ]; then - break - fi - sleep 1 - done - kubectl ko log ovn - kubectl ko log ovs - - for daemon in ovsdb-nb ovsdb-sb ovn-northd ovn-controller ovsdb-server ovs-vswitchd; do - echo "Checking if valgrind log file for $daemon exists..." - find kubectl-ko-log -type f -name "$daemon.valgrind.log.[[:digit:]]*" -exec false {} + && exit 1 - done - - find kubectl-ko-log -type f -name '*.valgrind.log.*' | while read f; do - if grep -qw 'definitely lost' "$f"; then - echo "Memory leak detected in $(basename $f | awk -F. '{print $1}')." - echo $f - cat "$f" - exit 1 - fi; - done - - cyclonus-netpol-e2e: - name: Cyclonus Network Policy E2E - if: | - always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && - (needs.netpol-path-filter.outputs.test-netpol == 1 || contains(github.event.pull_request.labels.*.name, 'network policy')) - needs: - - build-kube-ovn - - netpol-path-filter - runs-on: ubuntu-22.04 - timeout-minutes: 30 - strategy: - fail-fast: false - matrix: - ip-family: - - ipv4 - - ipv6 - - dual - steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - - uses: actions/checkout@v4 - - - name: Create the default branch directory - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - run: mkdir -p test/e2e/source - - - name: Check out the default branch - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - uses: actions/checkout@v4 - with: - ref: ${{ github.event.repository.default_branch }} - fetch-depth: 1 - path: test/e2e/source - - - name: Export E2E directory - run: | - if [ '${{ github.base_ref || github.ref_name }}' = '${{ github.event.repository.default_branch }}' ]; then - echo "E2E_DIR=." >> "$GITHUB_ENV" - else - echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV" - fi - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Download image - uses: actions/download-artifact@v4 - with: - name: kube-ovn - - - name: Load image - run: docker load --input kube-ovn.tar - - - name: Export debug image tag - run: echo "DEBUG_TAG='$(cat VERSION)-debug'" >> "$GITHUB_ENV" - - - name: Create kind cluster - run: | - sudo pip3 install jinjanator - sudo --preserve-env=CI PATH=~/.local/bin:$PATH make kind-init-${{ matrix.ip-family }} - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - id: install - env: - VERSION: ${{ env.DEBUG_TAG }} - DEBUG_WRAPPER: valgrind - run: make kind-install-${{ matrix.ip-family }} - - - name: Run E2E - id: e2e - working-directory: ${{ env.E2E_DIR }} - run: make cyclonus-netpol-e2e - - - name: Collect k8s events - if: failure() && steps.e2e.conclusion == 'failure' - run: | - kubectl get events -A -o yaml > cyclonus-netpol-e2e-${{ matrix.ip-family }}-events.yaml - tar zcf cyclonus-netpol-e2e-${{ matrix.ip-family }}-events.tar.gz cyclonus-netpol-e2e-${{ matrix.ip-family }}-events.yaml - - - name: Upload k8s events - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: cyclonus-netpol-e2e-${{ matrix.ip-family }}-events - path: cyclonus-netpol-e2e-${{ matrix.ip-family }}-events.tar.gz - - - name: Collect apiserver audit logs - if: failure() && steps.e2e.conclusion == 'failure' - run: | - docker cp kube-ovn-control-plane:/var/log/kubernetes/kube-apiserver-audit.log . - tar zcf cyclonus-netpol-e2e-${{ matrix.ip-family }}-audit-log.tar.gz kube-apiserver-audit.log - - - name: Upload apiserver audit logs - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: cyclonus-netpol-e2e-${{ matrix.ip-family }}-audit-log - path: cyclonus-netpol-e2e-${{ matrix.ip-family }}-audit-log.tar.gz - - - name: kubectl ko log - if: failure() && steps.e2e.conclusion == 'failure' - run: | - make kubectl-ko-log - mv kubectl-ko-log.tar.gz cyclonus-netpol-e2e-${{ matrix.ip-family }}-ko-log.tar.gz - - - name: upload kubectl ko log - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: cyclonus-netpol-e2e-${{ matrix.ip-family }}-ko-log - path: cyclonus-netpol-e2e-${{ matrix.ip-family }}-ko-log.tar.gz - - - name: Check kube ovn pod restarts - if: ${{ success() || (failure() && (steps.install.conclusion == 'failure' || steps.e2e.conclusion == 'failure')) }} - run: make check-kube-ovn-pod-restarts - - - name: Check valgrind result - run: | - kubectl -n kube-system rollout restart ds ovs-ovn - kubectl -n kube-system rollout status ds ovs-ovn - sleep 10 - kubectl -n kube-system rollout restart deploy ovn-central - kubectl -n kube-system rollout status deploy ovn-central - while true; do - if [ $(kubectl -n kube-system get pod -l app=ovs -o name | wc -l) -eq $(kubectl get node -o name | wc -l) ]; then - break - fi - sleep 1 - done - kubectl ko log ovn - kubectl ko log ovs - - for daemon in ovsdb-nb ovsdb-sb ovn-northd ovn-controller ovsdb-server ovs-vswitchd; do - echo "Checking if valgrind log file for $daemon exists..." - find kubectl-ko-log -type f -name "$daemon.valgrind.log.[[:digit:]]*" -exec false {} + && exit 1 - done - - find kubectl-ko-log -type f -name '*.valgrind.log.*' | while read f; do - if grep -qw 'definitely lost' "$f"; then - echo "Memory leak detected in $(basename $f | awk -F. '{print $1}')." - echo $f - cat "$f" - exit 1 - fi; - done - - kube-ovn-conformance-e2e: - name: Kube-OVN Conformance E2E - needs: - - build-kube-ovn - - build-e2e-binaries - runs-on: ubuntu-22.04 - timeout-minutes: 40 - strategy: - fail-fast: false - matrix: - ip-family: - - ipv4 - - ipv6 - - dual - mode: - - overlay - - underlay - steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - - uses: actions/checkout@v4 - - - name: Create the default branch directory - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - run: mkdir -p test/e2e/source - - - name: Check out the default branch - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - uses: actions/checkout@v4 - with: - ref: ${{ github.event.repository.default_branch }} - fetch-depth: 1 - path: test/e2e/source - - - name: Export E2E directory - run: | - if [ '${{ github.base_ref || github.ref_name }}' = '${{ github.event.repository.default_branch }}' ]; then - echo "E2E_DIR=." >> "$GITHUB_ENV" - else - echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV" - fi - - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: ${{ env.E2E_DIR }}/go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache/restore@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Download image - uses: actions/download-artifact@v4 - with: - name: kube-ovn - - - name: Load image - run: docker load --input kube-ovn.tar - - - name: Export debug image tag - run: echo "DEBUG_TAG='$(cat VERSION)-debug'" >> "$GITHUB_ENV" - - - name: Create kind cluster - run: | - sudo pip3 install jinjanator - sudo --preserve-env=CI PATH=~/.local/bin:$PATH make kind-init-${{ matrix.ip-family }} - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - id: install - env: - VERSION: ${{ env.DEBUG_TAG }} - DEBUG_WRAPPER: valgrind - run: make kind-install-${{ matrix.mode }}-${{ matrix.ip-family }} - - - name: Run E2E - id: e2e - working-directory: ${{ env.E2E_DIR }} - env: - E2E_BRANCH: ${{ github.base_ref || github.ref_name }} - E2E_IP_FAMILY: ${{ matrix.ip-family }} - E2E_NETWORK_MODE: ${{ matrix.mode }} - run: | - make kube-ovn-conformance-e2e - make kind-install-kubevirt - make kube-ovn-kubevirt-e2e - - - name: Collect k8s events - if: failure() && steps.e2e.conclusion == 'failure' - run: | - kubectl get events -A -o yaml > kube-ovn-conformance-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-events.yaml - tar zcf kube-ovn-conformance-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-events.tar.gz kube-ovn-conformance-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-events.yaml - - - name: Upload k8s events - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: kube-ovn-conformance-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-events - path: kube-ovn-conformance-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-events.tar.gz - - - name: Collect apiserver audit logs - if: failure() && steps.e2e.conclusion == 'failure' - run: | - docker cp kube-ovn-control-plane:/var/log/kubernetes/kube-apiserver-audit.log . - tar zcf kube-ovn-conformance-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-audit-log.tar.gz kube-apiserver-audit.log - - - name: Upload apiserver audit logs - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: kube-ovn-conformance-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-audit-log - path: kube-ovn-conformance-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-audit-log.tar.gz - - - name: kubectl ko log - if: failure() && steps.e2e.conclusion == 'failure' - run: | - make kubectl-ko-log - mv kubectl-ko-log.tar.gz kube-ovn-conformance-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-ko-log.tar.gz - - - name: upload kubectl ko log - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: kube-ovn-conformance-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-ko-log - path: kube-ovn-conformance-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-ko-log.tar.gz - - - name: Check kube ovn pod restarts - if: ${{ success() || (failure() && (steps.install.conclusion == 'failure' || steps.e2e.conclusion == 'failure')) }} - run: make check-kube-ovn-pod-restarts - - - name: Check valgrind result - run: | - kubectl -n kube-system rollout restart ds ovs-ovn - kubectl -n kube-system rollout status ds ovs-ovn - sleep 10 - kubectl -n kube-system rollout restart deploy ovn-central - kubectl -n kube-system rollout status deploy ovn-central - while true; do - if [ $(kubectl -n kube-system get pod -l app=ovs -o name | wc -l) -eq $(kubectl get node -o name | wc -l) ]; then - break - fi - sleep 1 - done - kubectl ko log ovn - kubectl ko log ovs - - for daemon in ovsdb-nb ovsdb-sb ovn-northd ovn-controller ovsdb-server ovs-vswitchd; do - echo "Checking if valgrind log file for $daemon exists..." - find kubectl-ko-log -type f -name "$daemon.valgrind.log.[[:digit:]]*" -exec false {} + && exit 1 - done - - find kubectl-ko-log -type f -name '*.valgrind.log.*' | while read f; do - if grep -qw 'definitely lost' "$f"; then - echo "Memory leak detected in $(basename $f | awk -F. '{print $1}')." - echo $f - cat "$f" - exit 1 - fi; - done - - - name: Cleanup - run: sh -x dist/images/cleanup.sh - - kube-ovn-ic-conformance-e2e: - name: Kube-OVN IC Conformance E2E - needs: - - build-kube-ovn - - build-e2e-binaries - runs-on: ubuntu-22.04 - strategy: - fail-fast: false - matrix: - ip-family: - - ipv4 - - ipv6 - - dual - timeout-minutes: 15 - steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - - uses: actions/checkout@v4 - - - name: Create the default branch directory - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - run: mkdir -p test/e2e/source - - - name: Check out the default branch - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - uses: actions/checkout@v4 - with: - ref: ${{ github.event.repository.default_branch }} - fetch-depth: 1 - path: test/e2e/source - - - name: Export E2E directory - run: | - if [ '${{ github.base_ref || github.ref_name }}' = '${{ github.event.repository.default_branch }}' ]; then - echo "E2E_DIR=." >> "$GITHUB_ENV" - else - echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV" - fi - - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: ${{ env.E2E_DIR }}/go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache/restore@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Download image - uses: actions/download-artifact@v4 - with: - name: kube-ovn - - - name: Load image - run: docker load --input kube-ovn.tar - - - name: Create kind clusters - run: | - sudo pip3 install jinjanator - sudo --preserve-env=CI PATH=~/.local/bin:$PATH make kind-init-ovn-ic-${{ matrix.ip-family }} - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - id: install - run: make kind-install-ovn-ic-${{ matrix.ip-family }} - - - name: Run E2E - id: e2e - working-directory: ${{ env.E2E_DIR }} - env: - E2E_BRANCH: ${{ github.base_ref || github.ref_name }} - E2E_IP_FAMILY: ${{ matrix.ip-family }} - run: make kube-ovn-ic-conformance-e2e - - - name: Collect k8s events - if: failure() && steps.e2e.conclusion == 'failure' - run: | - for cluster in `kind get clusters`; do - kubectl config use-context kind-$cluster - kubectl get events -A -o yaml > kube-ovn-ic-conformance-e2e-${{ matrix.ip-family }}-$cluster-events.yaml - done - tar zcf kube-ovn-ic-conformance-e2e-${{ matrix.ip-family }}-events.tar.gz \ - `kind get clusters | xargs -I {} echo kube-ovn-ic-conformance-e2e-${{ matrix.ip-family }}-{}-events.yaml` - - - name: Upload k8s events - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: kube-ovn-ic-conformance-e2e-${{ matrix.ip-family }}-events - path: kube-ovn-ic-conformance-e2e-${{ matrix.ip-family }}-events.tar.gz - - - name: Collect apiserver audit logs - if: failure() && steps.e2e.conclusion == 'failure' - run: | - for cluster in `kind get clusters`; do - docker cp $cluster-control-plane:/var/log/kubernetes/kube-apiserver-audit.log \ - ./kube-ovn-ic-conformance-e2e-${{ matrix.ip-family }}-$cluster-kube-apiserver-audit.log - done - tar zcvf kube-ovn-ic-conformance-e2e-${{ matrix.ip-family }}-audit-log.tar.gz \ - `kind get clusters | xargs -I {} echo kube-ovn-ic-conformance-e2e-${{ matrix.ip-family }}-{}-kube-apiserver-audit.log` - - - name: Upload apiserver audit logs - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: kube-ovn-ic-conformance-e2e-${{ matrix.ip-family }}-audit-log - path: kube-ovn-ic-conformance-e2e-${{ matrix.ip-family }}-audit-log.tar.gz - - - name: kubectl ko log - if: failure() && steps.e2e.conclusion == 'failure' - run: | - for cluster in `kind get clusters`; do - kubectl config use-context kind-$cluster - make kubectl-ko-log - mv kubectl-ko-log.tar.gz kube-ovn-ic-conformance-e2e-${{ matrix.ip-family }}-$cluster-ko-log.tar.gz - done - tar zcvf kube-ovn-ic-conformance-e2e-${{ matrix.ip-family }}-ko-log.tar.gz \ - `kind get clusters | xargs -I {} echo kube-ovn-ic-conformance-e2e-${{ matrix.ip-family }}-{}-ko-log.tar.gz` - - - name: upload kubectl ko log - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: kube-ovn-ic-conformance-e2e-${{ matrix.ip-family }}-ko-log - path: kube-ovn-ic-conformance-e2e-${{ matrix.ip-family }}-ko-log.tar.gz - - - name: Check kube ovn pod restarts - if: ${{ success() || (failure() && (steps.install.conclusion == 'failure' || steps.e2e.conclusion == 'failure')) }} - run: make check-kube-ovn-pod-restarts - - multus-conformance-e2e: - name: Multus Conformance E2E - needs: - - build-kube-ovn - - build-e2e-binaries - runs-on: ubuntu-22.04 - timeout-minutes: 10 - strategy: - fail-fast: false - matrix: - ip-family: - - ipv4 - - ipv6 - - dual - steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - - uses: actions/checkout@v4 - - - name: Create the default branch directory - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - run: mkdir -p test/e2e/source - - - name: Check out the default branch - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - uses: actions/checkout@v4 - with: - ref: ${{ github.event.repository.default_branch }} - fetch-depth: 1 - path: test/e2e/source - - - name: Export E2E directory - run: | - if [ '${{ github.base_ref || github.ref_name }}' = '${{ github.event.repository.default_branch }}' ]; then - echo "E2E_DIR=." >> "$GITHUB_ENV" - else - echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV" - fi - - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: ${{ env.E2E_DIR }}/go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache/restore@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Download kube-ovn image - uses: actions/download-artifact@v4 - with: - name: kube-ovn - - - name: Load images - run: docker load -i kube-ovn.tar - - - name: Create kind cluster - run: | - sudo pip3 install jinjanator - sudo --preserve-env=CI PATH=~/.local/bin:$PATH make kind-init-${{ matrix.ip-family }} - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - id: install - run: make kind-install-${{ matrix.ip-family }} - - - name: Install Multus - run: make kind-install-multus - - - name: Run E2E - id: e2e - working-directory: ${{ env.E2E_DIR }} - env: - E2E_BRANCH: ${{ github.base_ref || github.ref_name }} - E2E_IP_FAMILY: ${{ matrix.ip-family }} - run: make kube-ovn-multus-conformance-e2e - - - name: Collect k8s events - if: failure() && steps.e2e.conclusion == 'failure' - run: | - kubectl get events -A -o yaml > multus-conformance-e2e-${{ matrix.ip-family }}-events.yaml - tar zcf multus-conformance-e2e-${{ matrix.ip-family }}-events.tar.gz multus-conformance-e2e-${{ matrix.ip-family }}-events.yaml - - - name: Upload k8s events - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: multus-conformance-e2e-${{ matrix.ip-family }}-events - path: multus-conformance-e2e-${{ matrix.ip-family }}-events.tar.gz - - - name: Collect apiserver audit logs - if: failure() && steps.e2e.conclusion == 'failure' - run: | - docker cp kube-ovn-control-plane:/var/log/kubernetes/kube-apiserver-audit.log . - tar zcf multus-conformance-e2e-${{ matrix.ip-family }}-audit-log.tar.gz kube-apiserver-audit.log - - - name: Upload apiserver audit logs - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: multus-conformance-e2e-${{ matrix.ip-family }}-audit-log - path: multus-conformance-e2e-${{ matrix.ip-family }}-audit-log.tar.gz - - - name: kubectl ko log - if: failure() && steps.e2e.conclusion == 'failure' - run: | - make kubectl-ko-log - mv kubectl-ko-log.tar.gz multus-conformance-e2e-${{ matrix.ip-family }}-ko-log.tar.gz - - - name: upload kubectl ko log - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: multus-conformance-e2e-${{ matrix.ip-family }}-ko-log - path: multus-conformance-e2e-${{ matrix.ip-family }}-ko-log.tar.gz - - - name: Check kube ovn pod restarts - if: ${{ success() || (failure() && (steps.install.conclusion == 'failure' || steps.e2e.conclusion == 'failure')) }} - run: make check-kube-ovn-pod-restarts - - chart-test: - name: Chart Installation/Uninstallation Test - needs: build-kube-ovn - runs-on: ubuntu-22.04 - strategy: - fail-fast: false - matrix: - ssl: - - "true" - - "false" - timeout-minutes: 30 - steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - - uses: actions/checkout@v4 - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Download image - uses: actions/download-artifact@v4 - with: - name: kube-ovn - - - name: Load image - run: docker load --input kube-ovn.tar - - - name: Create kind cluster - run: | - sudo pip3 install jinjanator - sudo --preserve-env=CI PATH=~/.local/bin:$PATH make kind-init - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - id: install - env: - ENABLE_SSL: "${{ matrix.ssl }}" - run: make kind-install-chart - - - name: Check kube ovn pod restarts - if: ${{ success() || (failure() && steps.install.conclusion == 'failure') }} - run: make check-kube-ovn-pod-restarts - - - name: Uninstall Kube-OVN - run: make kind-uninstall-chart - - underlay-logical-gateway-installation-test: - name: Underlay Logical Gateway Installation Test - needs: build-kube-ovn - runs-on: ubuntu-22.04 - timeout-minutes: 30 - steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - - uses: actions/checkout@v4 - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Download image - uses: actions/download-artifact@v4 - with: - name: kube-ovn - - - name: Load image - run: docker load --input kube-ovn.tar - - - name: Create kind cluster - run: | - sudo pip3 install jinjanator - sudo --preserve-env=CI PATH=~/.local/bin:$PATH make kind-init-dual - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - id: install - run: make kind-install-underlay-logical-gateway-dual - - - name: Check kube ovn pod restarts - if: ${{ success() || (failure() && steps.install.conclusion == 'failure') }} - run: make check-kube-ovn-pod-restarts - - - name: Cleanup - run: sh -x dist/images/cleanup.sh - - no-ovn-lb-test: - name: Disable OVN LB Test - needs: build-kube-ovn - runs-on: ubuntu-22.04 - timeout-minutes: 30 - steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - - uses: actions/checkout@v4 - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Download image - uses: actions/download-artifact@v4 - with: - name: kube-ovn - - - name: Load image - run: docker load --input kube-ovn.tar - - - name: Create kind cluster - run: | - sudo pip3 install jinjanator - sudo --preserve-env=CI PATH=~/.local/bin:$PATH make kind-init - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN without LoadBalancer - id: install - env: - ENABLE_LB: "false" - run: make kind-install - - - name: Check kube ovn pod restarts - if: ${{ success() || (failure() && steps.install.conclusion == 'failure') }} - run: make check-kube-ovn-pod-restarts - - - name: Cleanup - run: sh -x dist/images/cleanup.sh - - no-np-test: - name: Disable Network Policy Test - needs: build-kube-ovn - runs-on: ubuntu-22.04 - timeout-minutes: 30 - steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - - uses: actions/checkout@v4 - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Download image - uses: actions/download-artifact@v4 - with: - name: kube-ovn - - - name: Load image - run: docker load --input kube-ovn.tar - - - name: Create kind cluster - run: | - sudo pip3 install jinjanator - sudo --preserve-env=CI PATH=~/.local/bin:$PATH make kind-init - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - id: install - env: - ENABLE_NP: "false" - run: make kind-install - - - name: Check kube ovn pod restarts - if: ${{ success() || (failure() && steps.install.conclusion == 'failure') }} - run: make check-kube-ovn-pod-restarts - - - name: Cleanup - run: sh -x dist/images/cleanup.sh - - lb-svc-e2e: - name: LB Service E2E - needs: - - build-kube-ovn - - build-vpc-nat-gateway - - build-e2e-binaries - runs-on: ubuntu-22.04 - timeout-minutes: 30 - steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - - uses: actions/checkout@v4 - - - name: Create the default branch directory - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - run: mkdir -p test/e2e/source - - - name: Check out the default branch - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - uses: actions/checkout@v4 - with: - ref: ${{ github.event.repository.default_branch }} - fetch-depth: 1 - path: test/e2e/source - - - name: Export E2E directory - run: | - if [ '${{ github.base_ref || github.ref_name }}' = '${{ github.event.repository.default_branch }}' ]; then - echo "E2E_DIR=." >> "$GITHUB_ENV" - else - echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV" - fi - - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: ${{ env.E2E_DIR }}/go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache/restore@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Download kube-ovn image - uses: actions/download-artifact@v4 - with: - name: kube-ovn - - - name: Download vpc-nat-gateway image - uses: actions/download-artifact@v4 - with: - name: vpc-nat-gateway - - - name: Load images - run: | - docker load -i kube-ovn.tar - docker load -i vpc-nat-gateway.tar - - - name: Create kind cluster - run: | - sudo pip3 install jinjanator - sudo --preserve-env=CI PATH=~/.local/bin:$PATH make kind-init - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Multus and Kube-OVN - id: install - run: make kind-install-lb-svc - - - name: Run E2E - id: e2e - working-directory: ${{ env.E2E_DIR }} - env: - E2E_BRANCH: ${{ github.base_ref || github.ref_name }} - run: make kube-ovn-lb-svc-conformance-e2e - - - name: Collect k8s events - if: failure() && steps.e2e.conclusion == 'failure' - run: | - kubectl get events -A -o yaml > lb-svc-e2e-events.yaml - tar zcf lb-svc-e2e-events.tar.gz lb-svc-e2e-events.yaml - - - name: Upload k8s events - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: lb-svc-e2e-events - path: lb-svc-e2e-events.tar.gz - - - name: Collect apiserver audit logs - if: failure() && steps.e2e.conclusion == 'failure' - run: | - docker cp kube-ovn-control-plane:/var/log/kubernetes/kube-apiserver-audit.log . - tar zcf lb-svc-e2e-audit-log.tar.gz kube-apiserver-audit.log - - - name: Upload apiserver audit logs - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: lb-svc-e2e-audit-log - path: lb-svc-e2e-audit-log.tar.gz - - - name: kubectl ko log - if: failure() && steps.e2e.conclusion == 'failure' - run: | - make kubectl-ko-log - mv kubectl-ko-log.tar.gz lb-svc-e2e-ko-log.tar.gz - - - name: upload kubectl ko log - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: lb-svc-e2e-ko-log - path: lb-svc-e2e-ko-log.tar.gz - - - name: Check kube ovn pod restarts - if: ${{ success() || (failure() && (steps.install.conclusion == 'failure' || steps.e2e.conclusion == 'failure')) }} - run: make check-kube-ovn-pod-restarts - - webhook-e2e: - name: Webhook E2E - needs: - - build-kube-ovn - - build-e2e-binaries - runs-on: ubuntu-22.04 - timeout-minutes: 10 - steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - - uses: actions/checkout@v4 - - - name: Create the default branch directory - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - run: mkdir -p test/e2e/source - - - name: Check out the default branch - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - uses: actions/checkout@v4 - with: - ref: ${{ github.event.repository.default_branch }} - fetch-depth: 1 - path: test/e2e/source - - - name: Export E2E directory - run: | - if [ '${{ github.base_ref || github.ref_name }}' = '${{ github.event.repository.default_branch }}' ]; then - echo "E2E_DIR=." >> "$GITHUB_ENV" - else - echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV" - fi - - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: ${{ env.E2E_DIR }}/go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache/restore@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Download kube-ovn image - uses: actions/download-artifact@v4 - with: - name: kube-ovn - - - name: Load images - run: | - docker load -i kube-ovn.tar - - - name: Create kind cluster - run: | - sudo pip3 install jinjanator - sudo --preserve-env=CI PATH=~/.local/bin:$PATH make kind-init - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN with webhook - id: install - run: make kind-install-webhook - - - name: Run E2E - id: e2e - working-directory: ${{ env.E2E_DIR }} - env: - E2E_BRANCH: ${{ github.base_ref || github.ref_name }} - run: make kube-ovn-webhook-e2e - - - name: kubectl ko log - if: failure() && steps.e2e.conclusion == 'failure' - run: | - make kubectl-ko-log - mv kubectl-ko-log.tar.gz webhook-e2e-ko-log.tar.gz - - - name: upload kubectl ko log - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: webhook-e2e-ko-log - path: webhook-e2e-ko-log.tar.gz - - - name: Check kube ovn pod restarts - if: ${{ success() || (failure() && (steps.install.conclusion == 'failure' || steps.e2e.conclusion == 'failure')) }} - run: make check-kube-ovn-pod-restarts - - installation-compatibility-test: - name: Installation Compatibility Test - needs: build-kube-ovn - runs-on: ubuntu-22.04 - timeout-minutes: 10 - steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - - uses: actions/checkout@v4 - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Download image - uses: actions/download-artifact@v4 - with: - name: kube-ovn - - - name: Load image - run: docker load --input kube-ovn.tar - - - name: Create kind cluster - env: - k8s_version: v1.23.17 - run: | - sudo pip3 install jinjanator - sudo --preserve-env=CI PATH=~/.local/bin:$PATH make kind-init - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - id: install - run: make kind-install - - - name: Check kube ovn pod restarts - if: ${{ success() || (failure() && steps.install.conclusion == 'failure') }} - run: make check-kube-ovn-pod-restarts - - - name: kubectl ko log - if: failure() && steps.install.conclusion == 'failure' - run: | - make kubectl-ko-log - mv kubectl-ko-log.tar.gz installation-compatibility-test-ko-log.tar.gz - - - name: upload kubectl ko log - uses: actions/upload-artifact@v4 - if: failure() && steps.install.conclusion == 'failure' - with: - name: installation-compatibility-test-ko-log - path: installation-compatibility-test-ko-log.tar.gz - - - name: Cleanup - run: sh -x dist/images/cleanup.sh - - cilium-chaining-e2e: - name: Cilium Chaining E2E - needs: - - build-kube-ovn - - build-e2e-binaries - runs-on: ubuntu-22.04 - timeout-minutes: 30 - strategy: - fail-fast: false - matrix: - ip-family: - - ipv4 - # - ipv6 - # - dual - mode: - - overlay - - underlay - steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - - uses: actions/checkout@v4 - - uses: azure/setup-helm@v4.2.0 - with: - version: '${{ env.HELM_VERSION }}' - - - name: Create the default branch directory - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - run: mkdir -p test/e2e/source - - - name: Check out the default branch - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - uses: actions/checkout@v4 - with: - ref: ${{ github.event.repository.default_branch }} - fetch-depth: 1 - path: test/e2e/source - - - name: Export E2E directory - run: | - if [ '${{ github.base_ref || github.ref_name }}' = '${{ github.event.repository.default_branch }}' ]; then - echo "E2E_DIR=." >> "$GITHUB_ENV" - else - echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV" - fi - - - name: Remove DNS search domain - run: | - sudo sed -i '/^search/d' /etc/resolv.conf - sudo systemctl restart docker - - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: ${{ env.E2E_DIR }}/go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache/restore@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Download image - uses: actions/download-artifact@v4 - with: - name: kube-ovn - - - name: Load image - run: docker load --input kube-ovn.tar - - - name: Create kind cluster - run: | - sudo pip3 install jinjanator - sudo --preserve-env=CI PATH=~/.local/bin:$PATH make kind-init-cilium-chaining-${{ matrix.ip-family }} - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN with Cilium chaining - id: install - run: make kind-install-cilium-chaining-${{ matrix.mode }}-${{ matrix.ip-family }} - - - name: Run E2E - id: e2e - working-directory: ${{ env.E2E_DIR }} - env: - E2E_CILIUM_CHAINING: "true" - E2E_BRANCH: ${{ github.base_ref || github.ref_name }} - E2E_IP_FAMILY: ${{ matrix.ip-family }} - E2E_NETWORK_MODE: ${{ matrix.mode }} - run: make k8s-conformance-e2e - - - name: Collect k8s events - if: failure() && steps.e2e.conclusion == 'failure' - run: | - kubectl get events -A -o yaml > cilium-chaining-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-events.yaml - tar zcf cilium-chaining-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-events.tar.gz cilium-chaining-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-events.yaml - - - name: Upload k8s events - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: cilium-chaining-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-events - path: cilium-chaining-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-events.tar.gz - - - name: Collect apiserver audit logs - if: failure() && steps.e2e.conclusion == 'failure' - run: | - docker cp kube-ovn-control-plane:/var/log/kubernetes/kube-apiserver-audit.log . - tar zcf cilium-chaining-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-audit-log.tar.gz kube-apiserver-audit.log - - - name: Upload apiserver audit logs - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: cilium-chaining-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-audit-log - path: cilium-chaining-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-audit-log.tar.gz - - - name: kubectl ko log - if: failure() && steps.e2e.conclusion == 'failure' - run: | - make kubectl-ko-log - mv kubectl-ko-log.tar.gz cilium-chaining-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-ko-log.tar.gz - - - name: upload kubectl ko log - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: cilium-chaining-e2e-ko-log - path: cilium-chaining-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-ko-log.tar.gz - - - name: Check kube ovn pod restarts - if: ${{ success() || (failure() && (steps.install.conclusion == 'failure' || steps.e2e.conclusion == 'failure')) }} - run: make check-kube-ovn-pod-restarts - - - name: Cleanup - run: sh -x dist/images/cleanup.sh - - kube-ovn-ha-e2e: - name: Kube-OVN HA E2E - needs: - - build-kube-ovn - - build-e2e-binaries - runs-on: ubuntu-22.04 - timeout-minutes: 15 - strategy: - fail-fast: false - matrix: - ssl: - - "true" - - "false" - bind-local: - - "true" - - "false" - ip-family: - - ipv4 - - ipv6 - - dual - steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - - uses: actions/checkout@v4 - - - name: Create the default branch directory - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - run: mkdir -p test/e2e/source - - - name: Check out the default branch - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - uses: actions/checkout@v4 - with: - ref: ${{ github.event.repository.default_branch }} - fetch-depth: 1 - path: test/e2e/source - - - name: Export E2E directory - run: | - if [ '${{ github.base_ref || github.ref_name }}' = '${{ github.event.repository.default_branch }}' ]; then - echo "E2E_DIR=." >> "$GITHUB_ENV" - else - echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV" - fi - - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: ${{ env.E2E_DIR }}/go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache/restore@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Download image - uses: actions/download-artifact@v4 - with: - name: kube-ovn - - - name: Load image - run: docker load --input kube-ovn.tar - - - name: Create kind cluster - run: | - sudo pip3 install jinjanator - sudo --preserve-env=CI PATH=~/.local/bin:$PATH make kind-init-ha-${{ matrix.ip-family }} - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - id: install - env: - NET_STACK: "${{ matrix.ip-family }}" - ENABLE_SSL: "${{ matrix.ssl }}" - ENABLE_BIND_LOCAL_IP: "${{ matrix.bind-local }}" - run: make kind-install-chart - - - name: Run E2E - id: e2e - working-directory: ${{ env.E2E_DIR }} - env: - E2E_BRANCH: ${{ github.base_ref || github.ref_name }} - E2E_IP_FAMILY: ${{ matrix.ip-family }} - run: | - make kube-ovn-security-e2e - make kube-ovn-ha-e2e - - - name: kubectl ko log - if: failure() && steps.e2e.conclusion == 'failure' - run: | - make kubectl-ko-log - mv kubectl-ko-log.tar.gz kube-ovn-ha-e2e-${{ matrix.ssl }}-${{ matrix.bind-local }}-${{ matrix.ip-family }}-ko-log.tar.gz - - - name: upload kubectl ko log - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: kube-ovn-ha-e2e-${{ matrix.ssl }}-${{ matrix.bind-local }}-${{ matrix.ip-family }}-ko-log - path: kube-ovn-ha-e2e-${{ matrix.ssl }}-${{ matrix.bind-local }}-${{ matrix.ip-family }}-ko-log.tar.gz - - - name: Check kube ovn pod restarts - if: ${{ success() || (failure() && (steps.install.conclusion == 'failure' || steps.e2e.conclusion == 'failure')) }} - run: make check-kube-ovn-pod-restarts - - - name: Cleanup - run: sh -x dist/images/cleanup.sh - - kube-ovn-submariner-conformance-e2e: - name: Kube-OVN Submariner Conformance E2E - needs: - - build-kube-ovn - runs-on: ubuntu-22.04 - timeout-minutes: 60 - steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - - uses: actions/checkout@v4 - - - name: Create the default branch directory - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - run: mkdir -p test/e2e/source - - - name: Check out the default branch - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - uses: actions/checkout@v4 - with: - ref: ${{ github.event.repository.default_branch }} - fetch-depth: 1 - path: test/e2e/source - - - name: Export E2E directory - run: | - if [ '${{ github.base_ref || github.ref_name }}' = '${{ github.event.repository.default_branch }}' ]; then - echo "E2E_DIR=." >> "$GITHUB_ENV" - else - echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV" - fi - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install submariner subctl - env: - VERSION: v${{ env.SUBMARINER_VERSION }} - DESTDIR: /usr/local/bin - run: curl -Ls https://get.submariner.io | bash - - - name: Download image - uses: actions/download-artifact@v4 - with: - name: kube-ovn - - - name: Load image - run: docker load --input kube-ovn.tar - - - name: Create kind cluster - run: | - sudo pip3 install jinjanator - sudo --preserve-env=CI PATH=~/.local/bin:$PATH make kind-init-ovn-submariner - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN and Submariner - id: install - run: make kind-install-ovn-submariner - - - name: Run E2E - id: e2e - working-directory: ${{ env.E2E_DIR }} - run: make kube-ovn-submariner-conformance-e2e - - - name: kubectl ko log - if: failure() && steps.e2e.conclusion == 'failure' - run: | - make kubectl-ko-log - mv kubectl-ko-log.tar.gz kube-ovn-submariner-conformance-e2e-ko-log.tar.gz - - - name: upload kubectl ko log - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: kube-ovn-submariner-conformance-e2e-ko-log - path: kube-ovn-submariner-conformance-e2e-ko-log.tar.gz - - - name: Check kube ovn pod restarts - if: ${{ success() || (failure() && (steps.install.conclusion == 'failure' || steps.e2e.conclusion == 'failure')) }} - run: make check-kube-ovn-pod-restarts - - - name: Cleanup - run: sh -x dist/images/cleanup.sh - - iptables-vpc-nat-gw-conformance-e2e: - name: Iptables VPC NAT Gateway E2E - needs: - - build-kube-ovn - - build-vpc-nat-gateway - - build-e2e-binaries - runs-on: ubuntu-22.04 - timeout-minutes: 15 - steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - - uses: actions/checkout@v4 - - - name: Create the default branch directory - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - run: mkdir -p test/e2e/source - - - name: Check out the default branch - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - uses: actions/checkout@v4 - with: - ref: ${{ github.event.repository.default_branch }} - fetch-depth: 1 - path: test/e2e/source - - - name: Export E2E directory - run: | - if [ '${{ github.base_ref || github.ref_name }}' = '${{ github.event.repository.default_branch }}' ]; then - echo "E2E_DIR=." >> "$GITHUB_ENV" - else - echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV" - fi - - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: ${{ env.E2E_DIR }}/go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache/restore@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Download kube-ovn image - uses: actions/download-artifact@v4 - with: - name: kube-ovn - - - name: Download vpc-nat-gateway image - uses: actions/download-artifact@v4 - with: - name: vpc-nat-gateway - - - name: Load images - run: | - docker load -i kube-ovn.tar - docker load -i vpc-nat-gateway.tar - - - name: Create kind cluster - run: | - sudo pip3 install jinjanator - sudo --preserve-env=CI PATH=~/.local/bin:$PATH make kind-init - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN with VPC NAT gateway enabled - id: install - run: make kind-install-vpc-nat-gw - - - name: Run E2E - id: e2e - working-directory: ${{ env.E2E_DIR }} - env: - E2E_BRANCH: ${{ github.base_ref || github.ref_name }} - run: make iptables-vpc-nat-gw-conformance-e2e - - - name: Collect k8s events - if: failure() && steps.e2e.conclusion == 'failure' - run: | - kubectl get events -A -o yaml > iptables-vpc-nat-gw-conformance-e2e-events.yaml - tar zcf iptables-vpc-nat-gw-conformance-e2e-events.tar.gz iptables-vpc-nat-gw-conformance-e2e-events.yaml - - - name: Upload k8s events - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: iptables-vpc-nat-gw-conformance-e2e-events - path: iptables-vpc-nat-gw-conformance-e2e-events.tar.gz - - - name: Collect apiserver audit logs - if: failure() && steps.e2e.conclusion == 'failure' - run: | - docker cp kube-ovn-control-plane:/var/log/kubernetes/kube-apiserver-audit.log . - tar zcf iptables-vpc-nat-gw-conformance-e2e-audit-log.tar.gz kube-apiserver-audit.log - - - name: Upload apiserver audit logs - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: iptables-vpc-nat-gw-conformance-e2e-audit-log - path: iptables-vpc-nat-gw-conformance-e2e-audit-log.tar.gz - - - name: kubectl ko log - if: failure() && steps.e2e.conclusion == 'failure' - run: | - make kubectl-ko-log - mv kubectl-ko-log.tar.gz iptables-vpc-nat-gw-conformance-e2e-ko-log.tar.gz - - - name: upload kubectl ko log - uses: actions/upload-artifact@v4 - if: failure() && steps.e2e.conclusion == 'failure' - with: - name: iptables-vpc-nat-gw-conformance-e2e-ko-log - path: iptables-vpc-nat-gw-conformance-e2e-ko-log.tar.gz - - - name: Check kube ovn pod restarts - if: ${{ success() || (failure() && (steps.install.conclusion == 'failure' || steps.e2e.conclusion == 'failure')) }} - run: make check-kube-ovn-pod-restarts - - ovn-vpc-nat-gw-conformance-e2e: - name: OVN VPC NAT Gateway E2E - needs: - - build-kube-ovn - - build-e2e-binaries - runs-on: ubuntu-22.04 - timeout-minutes: 15 - steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - - uses: actions/checkout@v4 - - - name: Create the default branch directory - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - run: mkdir -p test/e2e/source - - - name: Check out the default branch - if: (github.base_ref || github.ref_name) != github.event.repository.default_branch - uses: actions/checkout@v4 - with: - ref: ${{ github.event.repository.default_branch }} - fetch-depth: 1 - path: test/e2e/source - - - name: Export E2E directory - run: | - if [ '${{ github.base_ref || github.ref_name }}' = '${{ github.event.repository.default_branch }}' ]; then - echo "E2E_DIR=." >> "$GITHUB_ENV" - else - echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV" - fi - - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: ${{ env.E2E_DIR }}/go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache/restore@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Download kube-ovn image - uses: actions/download-artifact@v4 - with: - name: kube-ovn - - - name: Load images - run: docker load -i kube-ovn.tar - - - name: Create kind cluster - run: | - sudo pip3 install jinjanator - sudo --preserve-env=CI PATH=~/.local/bin:$PATH make kind-init - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - id: install - run: make kind-install - - - name: Run Vip E2E - id: vip-e2e - working-directory: ${{ env.E2E_DIR }} - env: - E2E_BRANCH: ${{ github.base_ref || github.ref_name }} - run: make vip-conformance-e2e - - - name: Run Ovn VPC NAT GW E2E - id: vpc-e2e - working-directory: ${{ env.E2E_DIR }} - env: - E2E_BRANCH: ${{ github.base_ref || github.ref_name }} - run: make ovn-vpc-nat-gw-conformance-e2e - - - name: Collect k8s events - if: failure() && (steps.vip-e2e.conclusion == 'failure' || steps.vpc-e2e.conclusion == 'failure') - run: | - kubectl get events -A -o yaml > ovn-vpc-nat-gw-conformance-e2e-events.yaml - tar zcf ovn-vpc-nat-gw-conformance-e2e-events.tar.gz ovn-vpc-nat-gw-conformance-e2e-events.yaml - - - name: Upload k8s events - uses: actions/upload-artifact@v4 - if: failure() && (steps.vip-e2e.conclusion == 'failure' || steps.vpc-e2e.conclusion == 'failure') - with: - name: ovn-vpc-nat-gw-conformance-e2e-events - path: ovn-vpc-nat-gw-conformance-e2e-events.tar.gz - - - name: Collect apiserver audit logs - if: failure() && (steps.vip-e2e.conclusion == 'failure' || steps.vpc-e2e.conclusion == 'failure') - run: | - docker cp kube-ovn-control-plane:/var/log/kubernetes/kube-apiserver-audit.log . - tar zcf ovn-vpc-nat-gw-conformance-e2e-audit-log.tar.gz kube-apiserver-audit.log - - - name: Upload apiserver audit logs - uses: actions/upload-artifact@v4 - if: failure() && (steps.vip-e2e.conclusion == 'failure' || steps.vpc-e2e.conclusion == 'failure') - with: - name: ovn-vpc-nat-gw-conformance-e2e-audit-log - path: ovn-vpc-nat-gw-conformance-e2e-audit-log.tar.gz - - - name: kubectl ko log - if: failure() && (steps.vip-e2e.conclusion == 'failure' || steps.vpc-e2e.conclusion == 'failure') - run: | - make kubectl-ko-log - mv kubectl-ko-log.tar.gz ovn-vpc-nat-gw-conformance-e2e-ko-log.tar.gz - - - name: upload kubectl ko log - uses: actions/upload-artifact@v4 - if: failure() && (steps.vip-e2e.conclusion == 'failure' || steps.vpc-e2e.conclusion == 'failure') - with: - name: ovn-vpc-nat-gw-conformance-e2e-ko-log - path: ovn-vpc-nat-gw-conformance-e2e-ko-log.tar.gz - - - name: Check kube ovn pod restarts - if: ${{ success() || (failure() && (steps.install.conclusion == 'failure' || steps.vip-e2e.conclusion == 'failure' || steps.vpc-e2e.conclusion == 'failure')) }} - run: make check-kube-ovn-pod-restarts - - push: - name: Push Images - needs: - - k8s-conformance-e2e - - k8s-netpol-e2e - - cyclonus-netpol-e2e - - kube-ovn-conformance-e2e - - kube-ovn-ic-conformance-e2e - - multus-conformance-e2e - - ovn-vpc-nat-gw-conformance-e2e - - iptables-vpc-nat-gw-conformance-e2e - - webhook-e2e - - lb-svc-e2e - - underlay-logical-gateway-installation-test - - chart-test - - installation-compatibility-test - - no-ovn-lb-test - - no-np-test - - cilium-chaining-e2e - - kube-ovn-ha-e2e - - kube-ovn-submariner-conformance-e2e - if: always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') - runs-on: ubuntu-22.04 - steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - - uses: actions/checkout@v4 - - - name: Download kube-ovn image - uses: actions/download-artifact@v4 - with: - name: kube-ovn - - - name: Download kube-ovn-dpdk image - uses: actions/download-artifact@v4 - if: github.event_name != 'pull_request' - with: - name: kube-ovn-dpdk - - - name: Download vpc-nat-gateway image - uses: actions/download-artifact@v4 - with: - name: vpc-nat-gateway - - - name: Load image - run: | - docker load --input kube-ovn.tar - docker load --input vpc-nat-gateway.tar - if [ '${{ github.event_name }}' != 'pull_request' ]; then - docker load --input kube-ovn-dpdk.tar - fi - - - name: Security Scan - run: | - sudo apt-get install wget apt-transport-https gnupg lsb-release - wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add - - echo deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list.d/trivy.list - sudo apt-get update - sudo apt-get install trivy - make scan - - - name: Push - if: github.ref_name == github.event.repository.default_branch || startsWith(github.ref_name, 'release-') - env: - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - COMMIT: ${{ github.sha }} - run: | - cat VERSION - TAG=$(cat VERSION) - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker tag kubeovn/kube-ovn:$TAG kubeovn/kube-ovn-dev:$COMMIT-x86 - docker tag kubeovn/kube-ovn:$TAG kubeovn/kube-ovn:$TAG-x86 - docker tag kubeovn/kube-ovn:$TAG-debug kubeovn/kube-ovn:$TAG-debug-x86 - docker tag kubeovn/kube-ovn:$TAG-dpdk kubeovn/kube-ovn:$TAG-dpdk-x86 - docker tag kubeovn/vpc-nat-gateway:$TAG kubeovn/vpc-nat-gateway-dev:$COMMIT-x86 - docker tag kubeovn/vpc-nat-gateway:$TAG kubeovn/vpc-nat-gateway:$TAG-x86 - docker images - docker push kubeovn/kube-ovn:$TAG-x86 - docker push kubeovn/kube-ovn:$TAG-amd64-legacy - docker push kubeovn/kube-ovn-dev:$COMMIT-x86 - docker push kubeovn/kube-ovn:$TAG-debug-x86 - docker push kubeovn/kube-ovn:$TAG-dpdk-x86 - docker push kubeovn/vpc-nat-gateway:$TAG-x86 - docker push kubeovn/vpc-nat-gateway-dev:$COMMIT-x86 diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml deleted file mode 100644 index 11b2dbba99f7..000000000000 --- a/.github/workflows/changelog.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: Changelog - -on: - workflow_dispatch: - push: - tags: - - v* - -jobs: - generate_changelog: - runs-on: ubuntu-latest - name: Generate changelog - steps: - - uses: actions/checkout@v4 - with: - ref: master - fetch-depth: 0 - - run: git fetch --prune --prune-tags - - run: git tag -l 'v*' - - run: ./hack/changelog.sh > CHANGELOG.md - - uses: peter-evans/create-pull-request@v6 - with: - title: 'docs: updated CHANGELOG.md' - commit-message: 'docs: updated CHANGELOG.md' - branch: create-pull-request/changelog - signoff: true diff --git a/.github/workflows/code-review.yaml b/.github/workflows/code-review.yaml deleted file mode 100644 index 7a1911de1a24..000000000000 --- a/.github/workflows/code-review.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: Code Review - -permissions: - contents: read - pull-requests: write - -on: - workflow_dispatch: - # pull_request_target: - # branches: - # - master - # - release-* - # paths-ignore: - # - 'docs/**' - # - '**.md' - # - 'go.mod' - # - 'go.sum' - -jobs: - review-code: - runs-on: ubuntu-latest - steps: - - name: test review - uses: oilbeater/smart-review@main - with: - apiKey: ${{ secrets.OPENAI_API_KEY }} - githubToken: ${{ secrets.GITHUB_TOKEN }} - apiBaseUrl: ${{ secrets.OPENAI_API_BASE_URL }} \ No newline at end of file diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index fc5d7432e04a..000000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,81 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -name: "CodeQL" - -on: - push: - branches: [master] - pull_request: - # The branches below must be a subset of the branches above - branches: [master] - schedule: - - cron: '0 17 * * 2' - -concurrency: - group: "${{ github.workflow }}-${{ github.ref }}" - cancel-in-progress: true - -env: - GO_VERSION: '' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-22.04 - - strategy: - fail-fast: false - matrix: - # Override automatic language detection by changing the below list - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] - language: ['go'] - # Learn more... - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request, then we can checkout the head. - fetch-depth: 2 - - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: go.mod - check-latest: true - cache: false - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - # - name: Autobuild - # uses: github/codeql-action/autobuild@v2 - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - - name: Build - run: | - make build-go - make build-go-windows - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml deleted file mode 100644 index 6a01606c53ff..000000000000 --- a/.github/workflows/lint.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: golangci-lint -on: - push: - tags: - - v* - branches: - - master - - main - pull_request: - -concurrency: - group: "${{ github.workflow }}-${{ github.ref }}" - cancel-in-progress: true - -env: - GO_VERSION: '' - -jobs: - golangci: - name: lint - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: go.mod - check-latest: true - cache: false - - - name: golangci-lint - uses: golangci/golangci-lint-action@v6 - with: - # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: latest - - # Optional: working directory, useful for monorepos - # working-directory: somedir - - # Optional: golangci-lint command line arguments. - args: --timeout 20m --verbose - # Optional: show only new issues if it's a pull request. The default value is `false`. - # only-new-issues: true diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml deleted file mode 100644 index fd2d7c3d4046..000000000000 --- a/.github/workflows/publish.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: Publish Release -on: - workflow_dispatch: - schedule: - - cron: "20 16 * * *" - -concurrency: - group: "${{ github.workflow }}-${{ github.ref }}" - cancel-in-progress: true - -jobs: - build: - name: Publish Images - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - - name: Publish - env: - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - DOCKER_CLI_EXPERIMENTAL: enabled - run: | - TAG=$(cat VERSION) - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker pull kubeovn/kube-ovn:$TAG-x86 - docker pull kubeovn/kube-ovn:$TAG-arm - docker pull kubeovn/kube-ovn:$TAG-debug-x86 - docker pull kubeovn/kube-ovn:$TAG-debug-arm - docker manifest create kubeovn/kube-ovn:$TAG kubeovn/kube-ovn:$TAG-x86 kubeovn/kube-ovn:$TAG-arm - docker manifest create kubeovn/kube-ovn:$TAG-debug kubeovn/kube-ovn:$TAG-debug-x86 kubeovn/kube-ovn:$TAG-debug-arm - docker manifest push kubeovn/kube-ovn:$TAG - docker manifest push kubeovn/kube-ovn:$TAG-debug - - docker pull kubeovn/vpc-nat-gateway:$TAG-x86 - docker pull kubeovn/vpc-nat-gateway:$TAG-arm - docker manifest create kubeovn/vpc-nat-gateway:$TAG kubeovn/vpc-nat-gateway:$TAG-x86 kubeovn/vpc-nat-gateway:$TAG-arm - docker manifest push kubeovn/vpc-nat-gateway:$TAG diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml deleted file mode 100644 index 2bced16c1794..000000000000 --- a/.github/workflows/release-chart.yaml +++ /dev/null @@ -1,31 +0,0 @@ -name: Release Charts - -on: - push: - tags: - - v* - -jobs: - release: - permissions: - contents: write # to push chart release and create a release (helm/chart-releaser-action) - - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Configure Git - run: | - git config user.name "$GITHUB_ACTOR" - git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - - - name: Run chart-releaser - uses: helm/chart-releaser-action@v1.6.0 - with: - skip_existing: true - packages_with_index: true - env: - CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/scheduled-e2e.yaml b/.github/workflows/scheduled-e2e.yaml deleted file mode 100644 index 804dc5ef4ded..000000000000 --- a/.github/workflows/scheduled-e2e.yaml +++ /dev/null @@ -1,1349 +0,0 @@ -name: Scheduled E2E - -on: - workflow_dispatch: - schedule: - - cron: "40 16 * * *" - -concurrency: - group: "${{ github.workflow }}-${{ github.ref }}" - cancel-in-progress: true - -env: - GO_VERSION: '' - KIND_VERSION: v0.23.0 - HELM_VERSION: v3.14.4 - SUBMARINER_VERSION: '0.17.1' - -jobs: - k8s-conformance-e2e: - name: Kubernetes Conformance E2E - runs-on: ubuntu-22.04 - timeout-minutes: 60 - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - - release-1.11 - ip-family: - - ipv4 - - ipv6 - - dual - mode: - - overlay - - underlay - steps: - - uses: actions/checkout@v4 - - - name: Remove DNS search domain - run: | - sudo sed -i '/^search/d' /etc/resolv.conf - sudo systemctl restart docker - - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Create branch directory - run: mkdir -p test/e2e/k8s-network/branches/${{ matrix.branch }} - - - name: Check out branch - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - fetch-depth: 1 - path: test/e2e/k8s-network/branches/${{ matrix.branch }} - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Create kind cluster - working-directory: test/e2e/k8s-network/branches/${{ matrix.branch }} - run: | - sudo pip3 install jinjanator j2cli - sudo PATH=~/.local/bin:$PATH make kind-init-${{ matrix.ip-family }} - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - working-directory: test/e2e/k8s-network/branches/${{ matrix.branch }} - 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-install-${{ matrix.mode }}-${{ matrix.ip-family }} - - - name: Run E2E - env: - E2E_BRANCH: ${{ matrix.branch }} - E2E_IP_FAMILY: ${{ matrix.ip-family }} - E2E_NETWORK_MODE: ${{ matrix.mode }} - run: make k8s-conformance-e2e - - - name: Check kube ovn pod restarts - run: | - make check-kube-ovn-pod-restarts - - k8s-netpol-e2e: - name: Kubernetes Network Policy E2E - runs-on: ubuntu-22.04 - timeout-minutes: 90 - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - - release-1.11 - ip-family: - - ipv4 - - ipv6 - - dual - steps: - - uses: actions/checkout@v4 - - - name: Remove DNS search domain - run: | - sudo sed -i '/^search/d' /etc/resolv.conf - sudo systemctl restart docker - - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Create branch directory - run: mkdir -p test/e2e/k8s-network/branches/${{ matrix.branch }} - - - name: Check out branch - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - fetch-depth: 1 - path: test/e2e/k8s-network/branches/${{ matrix.branch }} - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Create kind cluster - working-directory: test/e2e/k8s-network/branches/${{ matrix.branch }} - run: | - sudo pip3 install jinjanator j2cli - sudo PATH=~/.local/bin:$PATH make kind-init-${{ matrix.ip-family }} - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - working-directory: test/e2e/k8s-network/branches/${{ matrix.branch }} - 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-install-${{ matrix.ip-family }} - - - name: Run E2E - run: make k8s-netpol-e2e - - - name: Check kube ovn pod restarts - run: | - make check-kube-ovn-pod-restarts - - cyclonus-netpol-e2e: - name: Cyclonus Network Policy E2E - runs-on: ubuntu-22.04 - timeout-minutes: 30 - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - - release-1.11 - ip-family: - - ipv4 - - ipv6 - - dual - steps: - - uses: actions/checkout@v4 - - - name: Remove DNS search domain - run: | - sudo sed -i '/^search/d' /etc/resolv.conf - sudo systemctl restart docker - - - name: Create branch directory - run: mkdir -p test/e2e/k8s-network/branches/${{ matrix.branch }} - - - name: Check out branch - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - fetch-depth: 1 - path: test/e2e/k8s-network/branches/${{ matrix.branch }} - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Create kind cluster - working-directory: test/e2e/k8s-network/branches/${{ matrix.branch }} - run: | - sudo pip3 install jinjanator j2cli - sudo PATH=~/.local/bin:$PATH make kind-init-${{ matrix.ip-family }} - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - working-directory: test/e2e/k8s-network/branches/${{ matrix.branch }} - 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-install-${{ matrix.ip-family }} - - - name: Run E2E - run: make cyclonus-netpol-e2e - - - name: Check kube ovn pod restarts - run: | - make check-kube-ovn-pod-restarts - - kube-ovn-conformance-e2e: - name: Kube-OVN Conformance E2E - runs-on: ubuntu-22.04 - timeout-minutes: 40 - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - - release-1.11 - - release-1.12-mc - ip-family: - - ipv4 - - ipv6 - - dual - mode: - - overlay - - underlay - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Create branch directory - run: mkdir -p test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Check out branch - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - fetch-depth: 1 - path: test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Create kind cluster - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - run: | - sudo pip3 install jinjanator j2cli - sudo PATH=~/.local/bin:$PATH make kind-init-${{ matrix.ip-family }} - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - 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-install-${{ matrix.mode }}-${{ matrix.ip-family }} - - - name: Run E2E - env: - E2E_BRANCH: ${{ matrix.branch }} - E2E_IP_FAMILY: ${{ matrix.ip-family }} - E2E_NETWORK_MODE: ${{ matrix.mode }} - run: make kube-ovn-conformance-e2e - - - name: Check kube ovn pod restarts - run: | - make check-kube-ovn-pod-restarts - - kube-ovn-ic-conformance-e2e: - name: Kube-OVN IC Conformance E2E - runs-on: ubuntu-22.04 - timeout-minutes: 30 - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - - release-1.11 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Create branch directory - run: mkdir -p test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Check out branch - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - fetch-depth: 1 - path: test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Create kind cluster - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - run: | - sudo pip3 install jinjanator j2cli - sudo PATH=~/.local/bin:$PATH make kind-init-ovn-ic - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - 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-install-ovn-ic - - - name: Run E2E - env: - E2E_BRANCH: ${{ matrix.branch }} - run: make kube-ovn-ic-conformance-e2e - - - name: Check kube ovn pod restarts - run: | - make check-kube-ovn-pod-restarts - - underlay-logical-gateway-installation-test: - name: Underlay Logical Gateway Installation Test - runs-on: ubuntu-22.04 - timeout-minutes: 30 - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - - release-1.11 - steps: - - uses: actions/checkout@v4 - - - name: Create branch directory - run: mkdir -p test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Check out branch - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - fetch-depth: 1 - path: test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Create kind cluster - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - run: | - sudo pip3 install jinjanator j2cli - sudo PATH=~/.local/bin:$PATH make kind-init-dual - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - 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-install-underlay-logical-gateway-dual - - - name: Check kube ovn pod restarts - run: | - make check-kube-ovn-pod-restarts - - - name: Cleanup - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - run: sh dist/images/cleanup.sh - - no-ovn-lb-test: - name: Disable OVN LB Test - runs-on: ubuntu-22.04 - timeout-minutes: 30 - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - - release-1.11 - steps: - - uses: actions/checkout@v4 - - - name: Create branch directory - run: mkdir -p test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Check out branch - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - fetch-depth: 1 - path: test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Create kind cluster - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - run: | - sudo pip3 install jinjanator j2cli - sudo PATH=~/.local/bin:$PATH make kind-init - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN without LoadBalancer - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - env: - ENABLE_LB: "false" - 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-install - - - name: Check kube ovn pod restarts - run: | - make check-kube-ovn-pod-restarts - - - name: Cleanup - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - run: sh dist/images/cleanup.sh - - no-np-test: - name: Disable Network Policy Test - runs-on: ubuntu-22.04 - timeout-minutes: 30 - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - - release-1.11 - steps: - - uses: actions/checkout@v4 - - - name: Create branch directory - run: mkdir -p test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Check out branch - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - fetch-depth: 1 - path: test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Create kind cluster - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - run: | - sudo pip3 install jinjanator j2cli - sudo PATH=~/.local/bin:$PATH make kind-init - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - env: - ENABLE_NP: "false" - 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-install - - - name: Check kube ovn pod restarts - run: | - make check-kube-ovn-pod-restarts - - - name: Cleanup - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - run: sh dist/images/cleanup.sh - - lb-svc-e2e: - name: LB Service E2E - runs-on: ubuntu-22.04 - timeout-minutes: 30 - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - - release-1.11 - - release-1.12-mc - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Create branch directory - run: mkdir -p test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Check out branch - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - fetch-depth: 1 - path: test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Create kind cluster - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - run: | - sudo pip3 install jinjanator j2cli - sudo PATH=~/.local/bin:$PATH make kind-init - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Multus and Kube-OVN - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - 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 - docker pull kubeovn/vpc-nat-gateway:$version - VERSION=$version make kind-install-lb-svc - - - name: Run E2E - run: make kube-ovn-lb-svc-conformance-e2e - - - name: Check kube ovn pod restarts - run: make check-kube-ovn-pod-restarts - - kubevirt-e2e: - name: Kubevirt VM E2E - runs-on: ubuntu-22.04 - timeout-minutes: 30 - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - - release-1.12-mc - - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Create branch directory - run: mkdir -p test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Check out branch - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - fetch-depth: 1 - path: test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Create kind cluster - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - run: | - sudo pip3 install jinjanator j2cli - sudo PATH=~/.local/bin:$PATH make kind-init - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - 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-install - VERSION=$version make kind-install-kubevirt - - - name: Run E2E - run: make kube-ovn-kubevirt-e2e - - - name: Check kube ovn pod restarts - run: make check-kube-ovn-pod-restarts - - webhook-e2e: - name: Webhook E2E - runs-on: ubuntu-22.04 - timeout-minutes: 30 - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Create branch directory - run: mkdir -p test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Check out branch - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - fetch-depth: 1 - path: test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Create kind cluster - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - run: | - sudo pip3 install jinjanator j2cli - sudo PATH=~/.local/bin:$PATH make kind-init - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - 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-install-webhook - - - name: Run E2E - run: make kube-ovn-webhook-e2e - - - name: Check kube ovn pod restarts - run: | - make check-kube-ovn-pod-restarts - - installation-compatibility-test: - name: Installation Compatibility Test - runs-on: ubuntu-22.04 - timeout-minutes: 10 - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - - release-1.11 - steps: - - uses: actions/checkout@v4 - - - name: Create branch directory - run: mkdir -p test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Check out branch - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - fetch-depth: 1 - path: test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Create kind cluster - run: | - sudo pip3 install jinjanator j2cli - sudo PATH=~/.local/bin:$PATH k8s_version=v1.23.13 make kind-init - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - 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-install - - - name: Check kube ovn pod restarts - run: make check-kube-ovn-pod-restarts - - - name: Cleanup - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - run: sh dist/images/cleanup.sh - - cilium-chaining-e2e: - name: Cilium Chaining E2E - runs-on: ubuntu-22.04 - timeout-minutes: 30 - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - - release-1.11 - steps: - - uses: actions/checkout@v4 - - uses: azure/setup-helm@v4.2.0 - with: - version: '${{ env.HELM_VERSION }}' - - - name: Remove DNS search domain - run: | - sudo sed -i '/^search/d' /etc/resolv.conf - sudo systemctl restart docker - - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Create branch directory - run: mkdir -p test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Check out branch - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - fetch-depth: 1 - path: test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Create kind cluster - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - run: | - sudo pip3 install jinjanator j2cli - sudo PATH=~/.local/bin:$PATH make kind-init-cilium-chaining || \ - sudo PATH=~/.local/bin:$PATH make kind-init - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN with Cilium chaining - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - 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-install-cilium-chaining - - - name: Run E2E - env: - E2E_CILIUM_CHAINING: "true" - run: make k8s-conformance-e2e - - - name: Check kube ovn pod restarts - run: | - make check-kube-ovn-pod-restarts - - - name: Cleanup - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - run: sh dist/images/cleanup.sh - - kube-ovn-ha-e2e: - name: Kube-OVN HA E2E - runs-on: ubuntu-22.04 - timeout-minutes: 30 - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - - release-1.11 - - release-1.12-mc - ssl: - - "true" - - "false" - bind-local: - - "true" - - "false" - ip-family: - - ipv4 - - ipv6 - - dual - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Create branch directory - run: mkdir -p test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Check out branch - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - fetch-depth: 1 - path: test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Create kind cluster - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - run: | - sudo pip3 install jinjanator j2cli - sudo PATH=~/.local/bin:$PATH make kind-init-ha-${{ matrix.ip-family }} - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - 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 - sudo VERSION=$version ENABLE_SSL=${{ matrix.ssl }} \ - ENABLE_BIND_LOCAL_IP=${{ matrix.bind-local }} \ - make kind-install-${{ matrix.ip-family }} - - - name: Run E2E - env: - E2E_BRANCH: ${{ matrix.branch }} - E2E_IP_FAMILY: ${{ matrix.ip-family }} - run: | - make kube-ovn-security-e2e - make kube-ovn-ha-e2e - - - name: Check kube ovn pod restarts - run: | - make check-kube-ovn-pod-restarts - - - name: Cleanup - run: sh dist/images/cleanup.sh - - chart-upgrade-e2e: - name: Chart Upgrade E2E - runs-on: ubuntu-22.04 - timeout-minutes: 30 - strategy: - fail-fast: false - matrix: - case: - - release-1.11 => release-1.12 - - release-1.11 => master - - release-1.12 => master - steps: - - uses: actions/checkout@v4 - - uses: azure/setup-helm@v4.2.0 - with: - version: '${{ env.HELM_VERSION }}' - - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Parse versions - run: | - version_from=$(echo '${{ matrix.case }}' | awk '{print $1}') - version_to=$(echo '${{ matrix.case }}' | awk '{print $3}') - echo "VERSION_FROM=$version_from" >> "$GITHUB_ENV" - echo "VERSION_TO=$version_to" >> "$GITHUB_ENV" - - - name: Create branch directory - run: mkdir -p test/e2e/kube-ovn/branches - - - uses: actions/checkout@v4 - with: - ref: ${{ env.VERSION_FROM }} - fetch-depth: 1 - path: test/e2e/kube-ovn/branches/${{ env.VERSION_FROM }} - - - uses: actions/checkout@v4 - with: - ref: ${{ env.VERSION_TO }} - fetch-depth: 1 - path: test/e2e/kube-ovn/branches/${{ env.VERSION_TO }} - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - working-directory: ${{ env.E2E_DIR }} - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Create kind cluster - run: | - sudo pip3 install jinjanator j2cli - sudo PATH=~/.local/bin:$PATH make kind-init-ha - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - working-directory: test/e2e/kube-ovn/branches/${{ env.VERSION_FROM }} - 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-install-chart - - - name: Upgrade Kube-OVN - working-directory: test/e2e/kube-ovn/branches/${{ env.VERSION_TO }} - 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 - - - name: Run E2E - env: - E2E_BRANCH: ${{ env.VERSION_TO }} - run: make k8s-conformance-e2e - - - name: Check kube ovn pod restarts - run: | - make check-kube-ovn-pod-restarts - - - name: Cleanup - working-directory: test/e2e/kube-ovn/branches/${{ env.VERSION_TO }} - run: sh dist/images/cleanup.sh - - kube-ovn-submariner-conformance-e2e: - name: Kube-OVN Submariner Conformance E2E - runs-on: ubuntu-22.04 - timeout-minutes: 30 - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - steps: - - uses: actions/checkout@v4 - - - name: Create branch directory - run: mkdir -p test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Check out branch - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - fetch-depth: 1 - path: test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install submariner subctl - env: - VERSION: v${{ env.SUBMARINER_VERSION }} - DESTDIR: /usr/local/bin - run: curl -Ls https://get.submariner.io | bash - - - name: Create kind cluster - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - run: | - sudo pip3 install jinjanator j2cli - sudo PATH=~/.local/bin:$PATH make kind-init-ovn-submariner - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - 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-install-ovn-submariner - - - name: Run E2E - run: make kube-ovn-submariner-conformance-e2e - - - name: Check kube ovn pod restarts - run: | - make check-kube-ovn-pod-restarts - - - name: Cleanup - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - run: sh dist/images/cleanup.sh - - iptables-vpc-nat-gw-conformance-e2e: - name: Iptables VPC NAT Gateway E2E - runs-on: ubuntu-22.04 - timeout-minutes: 15 - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Create branch directory - run: mkdir -p test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Check out branch - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - fetch-depth: 1 - path: test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Create kind cluster - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - run: | - sudo pip3 install jinjanator j2cli - sudo PATH=~/.local/bin:$PATH make kind-init - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN with VPC NAT gateway enabled - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - 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 - docker pull kubeovn/vpc-nat-gateway:$version - VERSION=$version make kind-install-vpc-nat-gw - - - name: Run E2E - run: make iptables-vpc-nat-gw-conformance-e2e - - - name: Check kube ovn pod restarts - run: | - make check-kube-ovn-pod-restarts - - ovn-vpc-nat-gw-conformance-e2e: - name: OVN VPC NAT Gateway E2E - runs-on: ubuntu-22.04 - timeout-minutes: 10 - strategy: - fail-fast: false - matrix: - branch: - - master - - release-1.12 - - release-1.12-mc - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION || '' }} - go-version-file: go.mod - check-latest: true - cache: false - - - name: Export Go full version - run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV" - - - name: Go cache - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- - - - name: Create branch directory - run: mkdir -p test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Check out branch - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - fetch-depth: 1 - path: test/e2e/kube-ovn/branches/${{ matrix.branch }} - - - name: Install kind - uses: helm/kind-action@v1.10.0 - with: - version: ${{ env.KIND_VERSION }} - install_only: true - - - name: Install ginkgo - run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo - - - name: Create kind cluster - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - run: | - sudo pip3 install jinjanator j2cli - sudo PATH=~/.local/bin:$PATH make kind-init - sudo cp -r /root/.kube/ ~/.kube/ - sudo chown -R $(id -un). ~/.kube/ - - - name: Install Kube-OVN - working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }} - 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-install - - - name: Run E2E - run: make ovn-vpc-nat-gw-conformance-e2e - - - name: Check kube ovn pod restarts - run: | - make check-kube-ovn-pod-restarts diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index ef0a9bde0212..000000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Mark stale issues and pull requests - -on: - schedule: - - cron: "0 0 * * *" - -jobs: - stale: - - runs-on: ubuntu-latest - - steps: - - uses: actions/stale@v9 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: 'Issues go stale after 60d of inactivity. Please comment or re-open the issue if you are still interested in getting this issue fixed.' - stale-pr-message: 'PRs go stale after 60d of inactivity. Please comment or re-open the PR if you are still working on this PR.' - stale-issue-label: 'no-issue-activity' - stale-pr-label: 'no-pr-activity' - days-before-stale: 60 - exempt-issue-labels: 'ignore-no-issue-activity' \ No newline at end of file