-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
28 changed files
with
1,368 additions
and
598 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -564,152 +564,6 @@ jobs: | |
fi; | ||
done | ||
k8s-netpol-legacy-e2e: | ||
name: Kubernetes Network Policy Legacy 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: 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@v4 | ||
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 version | awk '{print $3}')" >> "$GITHUB_ENV" | ||
|
||
- name: Go cache | ||
uses: actions/cache/restore@v3 | ||
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/[email protected] | ||
with: | ||
version: v0.20.0 | ||
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@v3 | ||
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 j2cli | ||
sudo pip3 install "j2cli[yaml]" | ||
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 | ||
env: | ||
VERSION: ${{ env.DEBUG_TAG }} | ||
DEBUG_WRAPPER: valgrind | ||
run: make kind-install-${{ matrix.ip-family }} | ||
|
||
- name: Run E2E | ||
working-directory: ${{ env.E2E_DIR }} | ||
run: make k8s-netpol-legacy-e2e | ||
|
||
- name: kubectl ko log | ||
if: failure() | ||
run: | | ||
make kubectl-ko-log | ||
mv kubectl-ko-log.tar.gz k8s-netpol-legacy-e2e-${{ matrix.ip-family }}-ko-log.tar.gz | ||
- name: upload kubectl ko log | ||
uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: k8s-netpol-legacy-e2e-${{ matrix.ip-family }}-ko-log | ||
path: k8s-netpol-legacy-e2e-${{ matrix.ip-family }}-ko-log.tar.gz | ||
|
||
- name: Check valgrind result | ||
run: | | ||
kubectl -n kube-system rollout restart deploy ovn-central | ||
kubectl -n kube-system rollout restart ds ovs-ovn | ||
kubectl -n kube-system rollout status deploy ovn-central | ||
kubectl -n kube-system rollout status ds ovs-ovn | ||
while true; do | ||
if [ ! -z "$(kubectl -n kube-system get ep ovn-nb -o jsonpath='{.subsets}')" ]; 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: | | ||
|
@@ -2043,7 +1897,6 @@ jobs: | |
- build-centos-compile | ||
- k8s-conformance-e2e | ||
- k8s-netpol-e2e | ||
- k8s-netpol-legacy-e2e | ||
- cyclonus-netpol-e2e | ||
- kube-ovn-conformance-e2e | ||
- kube-ovn-ic-conformance-e2e | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -186,88 +186,6 @@ jobs: | |
- name: Run E2E | ||
run: make k8s-netpol-e2e | ||
|
||
k8s-netpol-legacy-e2e: | ||
name: Kubernetes Network Policy Legacy E2E | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 90 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
branch: | ||
- master | ||
- release-1.12 | ||
- release-1.11 | ||
- release-1.9 | ||
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@v4 | ||
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 version | awk '{print $3}')" >> "$GITHUB_ENV" | ||
|
||
- name: Go cache | ||
uses: actions/cache@v3 | ||
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/[email protected] | ||
with: | ||
version: v0.20.0 | ||
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 j2cli | ||
sudo pip3 install "j2cli[yaml]" | ||
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-legacy-e2e | ||
|
||
cyclonus-netpol-e2e: | ||
name: Cyclonus Network Policy E2E | ||
runs-on: ubuntu-22.04 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.