Skip to content

Commit

Permalink
Merge branch 'kubeovn:master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
qiutingjun authored Oct 13, 2023
2 parents 0df7c72 + ce80120 commit 9389319
Show file tree
Hide file tree
Showing 63 changed files with 2,297 additions and 802 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
# python: Rename build related code to ovs_build_helpers.
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovn/commit/9d961aec6fd7ef3e3002bc34e285833279e989c2.patch" -OutFile ..\ovn-00.patch
# change hash type from dp_hash to hash with field src_ip
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovn/commit/5a04402c01df1463b9e1edcbc1c5634793687140.patch" -OutFile ..\ovn-01.patch
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovn/commit/75876f75203bbf06a8f5ffb5628eca98bef03407.patch" -OutFile ..\ovn-01.patch
# add support for windows
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovn/commit/2be843b9fc7cba253fb27fc57c384034e97db148.patch" -OutFile ..\ovn-02.patch
# set br-int controller to TCP 127.0.0.1:6653
Expand Down
147 changes: 0 additions & 147 deletions .github/workflows/build-x86-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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
Expand Down
82 changes: 0 additions & 82 deletions .github/workflows/scheduled-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ kwok-node.yaml
broker-info.subm
broker-info.subm.*
broker-info-internal.subm
yamls/clab-bgp.yaml
yamls/clab-bgp-ha.yaml
kube-ovn.tar
vpc-nat-gateway.tar
image-amd64.tar
Expand Down
Loading

0 comments on commit 9389319

Please sign in to comment.