Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add release-1.8/1.9/1.10 to scheduled e2e #2224

Merged
merged 6 commits into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 69 additions & 26 deletions .github/workflows/scheduled-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
matrix:
branch:
- master
- release-1.10
- release-1.9
- release-1.8
ip-family:
- ipv4
- ipv6
Expand Down Expand Up @@ -85,8 +88,9 @@ jobs:
- name: Install Kube-OVN
working-directory: test/e2e/k8s-network/branches/${{ matrix.branch }}
run: |
docker pull kubeovn/kube-ovn:$(cat VERSION)
make kind-install-${{ matrix.mode }}-${{ matrix.ip-family }}
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:
Expand All @@ -104,6 +108,9 @@ jobs:
matrix:
branch:
- master
- release-1.10
- release-1.9
- release-1.8
ip-family:
- ipv4
- ipv6
Expand Down Expand Up @@ -162,8 +169,9 @@ jobs:
- name: Install Kube-OVN
working-directory: test/e2e/k8s-network/branches/${{ matrix.branch }}
run: |
docker pull kubeovn/kube-ovn:$(cat VERSION)
make kind-install-${{ matrix.ip-family }}
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
Expand All @@ -177,6 +185,9 @@ jobs:
matrix:
branch:
- master
- release-1.10
- release-1.9
- release-1.8
ip-family:
- ipv4
- ipv6
Expand Down Expand Up @@ -217,8 +228,9 @@ jobs:
- name: Install Kube-OVN
working-directory: test/e2e/k8s-network/branches/${{ matrix.branch }}
run: |
docker pull kubeovn/kube-ovn:$(cat VERSION)
make kind-install-${{ matrix.ip-family }}
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
Expand All @@ -232,6 +244,9 @@ jobs:
matrix:
branch:
- master
- release-1.10
- release-1.9
- release-1.8
ip-family:
- ipv4
- ipv6
Expand Down Expand Up @@ -287,8 +302,9 @@ jobs:
- name: Install Kube-OVN
working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }}
run: |
docker pull kubeovn/kube-ovn:$(cat VERSION)
make kind-install-${{ matrix.mode }}-${{ matrix.ip-family }}
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:
Expand All @@ -306,6 +322,8 @@ jobs:
matrix:
branch:
- master
- release-1.10
- release-1.9
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
Expand Down Expand Up @@ -354,8 +372,9 @@ jobs:
- name: Install Kube-OVN
working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }}
run: |
docker pull kubeovn/kube-ovn:$(cat VERSION)
make kind-install-ovn-ic
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:
Expand All @@ -371,6 +390,9 @@ jobs:
matrix:
branch:
- master
- release-1.10
- release-1.9
- release-1.8
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -402,8 +424,9 @@ jobs:
- name: Install Kube-OVN
working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }}
run: |
docker pull kubeovn/kube-ovn:$(cat VERSION)
sudo ENABLE_SSL=true make kind-install
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 ENABLE_SSL=true VERSION=$version make kind-install

- name: Cleanup
working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }}
Expand All @@ -418,6 +441,8 @@ jobs:
matrix:
branch:
- master
- release-1.10
- release-1.9
steps:
- uses: actions/checkout@v3

Expand All @@ -430,7 +455,7 @@ jobs:
ref: ${{ matrix.branch }}
fetch-depth: 1
path: test/e2e/kube-ovn/branches/${{ matrix.branch }}

- name: Install kind
run: |
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-$(uname)-amd64
Expand All @@ -449,8 +474,9 @@ jobs:
- name: Install Kube-OVN
working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }}
run: |
docker pull kubeovn/kube-ovn:$(cat VERSION)
make kind-install-underlay-logical-gateway-dual
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: Cleanup
working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }}
Expand All @@ -465,6 +491,9 @@ jobs:
matrix:
branch:
- master
- release-1.10
- release-1.9
- release-1.8
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -498,8 +527,9 @@ jobs:
env:
ENABLE_LB: "false"
run: |
docker pull kubeovn/kube-ovn:$(cat VERSION)
make kind-install
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: Cleanup
working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }}
Expand All @@ -514,6 +544,9 @@ jobs:
matrix:
branch:
- master
- release-1.10
- release-1.9
- release-1.8
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -547,8 +580,9 @@ jobs:
env:
ENABLE_NP: "false"
run: |
docker pull kubeovn/kube-ovn:$(cat VERSION)
make kind-install
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: Cleanup
working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }}
Expand Down Expand Up @@ -616,9 +650,10 @@ jobs:
- name: Install Kube-OVN
working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }}
run: |
docker pull kubeovn/kube-ovn:$(cat VERSION)
docker pull kubeovn/vpc-nat-gateway:$(cat VERSION)
make kind-install-lb-svc
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
Expand All @@ -632,6 +667,9 @@ jobs:
matrix:
branch:
- master
- release-1.10
- release-1.9
- release-1.8
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -662,8 +700,9 @@ jobs:
- name: Install Kube-OVN
working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }}
run: |
docker pull kubeovn/kube-ovn:$(cat VERSION)
make kind-install
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: Cleanup
working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }}
Expand All @@ -678,6 +717,9 @@ jobs:
matrix:
branch:
- master
- release-1.10
- release-1.9
- release-1.8
steps:
- uses: actions/checkout@v3
- uses: azure/setup-helm@v3
Expand Down Expand Up @@ -735,8 +777,9 @@ jobs:
- name: Install Kube-OVN
working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }}
run: |
docker pull kubeovn/kube-ovn:$(cat VERSION)
make kind-install
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 k8s-conformance-e2e
Expand Down
15 changes: 8 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ include Makefile.e2e
REGISTRY = kubeovn
DEV_TAG = dev
RELEASE_TAG = $(shell cat VERSION)
VERSION = $(shell echo $${VERSION:-$(RELEASE_TAG)})
COMMIT = git-$(shell git rev-parse --short HEAD)
DATE = $(shell date +"%Y-%m-%d_%H:%M:%S")
GOLDFLAGS = "-w -s -extldflags '-z now' -X github.com/kubeovn/kube-ovn/versions.COMMIT=$(COMMIT) -X github.com/kubeovn/kube-ovn/versions.VERSION=$(RELEASE_TAG) -X github.com/kubeovn/kube-ovn/versions.BUILDDATE=$(DATE)"
Expand All @@ -17,7 +18,7 @@ MULTUS_YAML = https://raw.githubusercontent.com/k8snetworkplumbingwg/multus-cni/
CILIUM_VERSION = 1.11.6
CILIUM_IMAGE_REPO = quay.io/cilium/cilium

VPC_NAT_GW_IMG = $(REGISTRY)/vpc-nat-gateway:$(RELEASE_TAG)
VPC_NAT_GW_IMG = $(REGISTRY)/vpc-nat-gateway:$(VERSION)

E2E_NETWORK = bridge
ifneq ($(VLAN_ID),)
Expand Down Expand Up @@ -171,16 +172,16 @@ define docker_config_bridge
default=$$(docker network inspect $(1) -f '{{index .Options "com.docker.network.bridge.default_bridge"}}'); \
br="docker0"; \
[ "$$default" != "true" ] && br="br-$$(docker network inspect $(1) -f "{{.Id}}" | head -c 12)"; \
docker run --rm --privileged --network=host $(REGISTRY)/kube-ovn:$(RELEASE_TAG) bash -ec '\
docker run --rm --privileged --network=host $(REGISTRY)/kube-ovn:$(VERSION) bash -ec '\
for brif in $$(ls /sys/class/net/'$$br'/brif); do \
echo $(2) > /sys/class/net/'$$br'/brif/$$brif/hairpin_mode; \
done'; \
if [ -z "$(3)" ]; then \
docker run --rm --privileged --network=host $(REGISTRY)/kube-ovn:$(RELEASE_TAG) bash -ec '\
docker run --rm --privileged --network=host $(REGISTRY)/kube-ovn:$(VERSION) bash -ec '\
echo 0 > /sys/class/net/'$$br'/bridge/vlan_filtering; \
'; \
else \
docker run --rm --privileged --network=host $(REGISTRY)/kube-ovn:$(RELEASE_TAG) bash -ec '\
docker run --rm --privileged --network=host $(REGISTRY)/kube-ovn:$(VERSION) bash -ec '\
echo 1 > /sys/class/net/'$$br'/bridge/vlan_filtering; \
bridge vlan show | awk "/^'$$br'/{print \$$2; while (getline > 0) {\
if (\$$0 ~ /^[[:blank:]]/) {print \$$1} else {exit 0} }\
Expand Down Expand Up @@ -265,7 +266,7 @@ kind-init-cilium:

.PHONY: kind-load-image
kind-load-image:
$(call kind_load_image,kube-ovn,$(REGISTRY)/kube-ovn:$(RELEASE_TAG))
$(call kind_load_image,kube-ovn,$(REGISTRY)/kube-ovn:$(VERSION))

.PHONY: kind-untaint-control-plane
kind-untaint-control-plane:
Expand Down Expand Up @@ -312,7 +313,7 @@ kind-install-overlay-ipv4: kind-install

.PHONY: kind-install-ovn-ic
kind-install-ovn-ic: kind-load-image kind-install
$(call kind_load_image,kube-ovn1,$(REGISTRY)/kube-ovn:$(RELEASE_TAG))
$(call kind_load_image,kube-ovn1,$(REGISTRY)/kube-ovn:$(VERSION))
kubectl config use-context kind-kube-ovn1
sed -e 's/10.16.0/10.18.0/g' \
-e 's/10.96.0/10.98.0/g' \
Expand All @@ -321,7 +322,7 @@ kind-install-ovn-ic: kind-load-image kind-install
bash
kubectl describe no

docker run -d --name ovn-ic-db --network kind $(REGISTRY)/kube-ovn:$(RELEASE_TAG) bash start-ic-db.sh
docker run -d --name ovn-ic-db --network kind $(REGISTRY)/kube-ovn:$(VERSION) bash start-ic-db.sh
@set -e; \
ic_db_host=$$(docker inspect ovn-ic-db -f "{{.NetworkSettings.Networks.kind.IPAddress}}"); \
zone=az0 ic_db_host=$$ic_db_host gateway_node_name=kube-ovn-control-plane j2 yamls/ovn-ic.yaml.j2 -o ovn-ic-0.yaml; \
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/framework/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ func (f *Framework) BeforeEach() {
}

func (f *Framework) SkipVersionPriorTo(major, minor uint, message string) {
if f.ClusterVersionMajor <= major && f.ClusterVersionMinor < minor {
if f.ClusterVersionMajor < major ||
(f.ClusterVersionMajor == major && f.ClusterVersionMinor < minor) {
ginkgo.Skip(message)
}
}
Expand Down