Skip to content

Commit e0fe08c

Browse files
committed
ci: fix cilium chaining e2e (#2391)
1 parent 365e8f4 commit e0fe08c

8 files changed

+35
-24
lines changed

.github/workflows/build-x86-image.yaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ concurrency:
2222

2323
env:
2424
GOSEC_VERSION: '2.15.0'
25-
HELM_VERSION: v3.10.3
25+
HELM_VERSION: v3.11.1
2626

2727
jobs:
2828
build-kube-ovn:
@@ -1086,11 +1086,13 @@ jobs:
10861086
sudo cp -r /root/.kube/ ~/.kube/
10871087
sudo chown -R $(id -un). ~/.kube/
10881088
1089-
- name: Install Kube-OVN
1090-
run: make kind-install
1089+
- name: Install Kube-OVN with Cilium chaining
1090+
run: make kind-install-cilium-chaining
10911091

10921092
- name: Run E2E
10931093
working-directory: ${{ env.E2E_DIR }}
1094+
env:
1095+
E2E_CILIUM_CHAINING: "true"
10941096
run: make k8s-conformance-e2e
10951097

10961098
- name: Cleanup

.github/workflows/scheduled-e2e.yaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ concurrency:
1010
cancel-in-progress: true
1111

1212
env:
13-
HELM_VERSION: v3.10.1
13+
HELM_VERSION: v3.11.1
1414

1515
jobs:
1616
k8s-conformance-e2e:
@@ -830,14 +830,16 @@ jobs:
830830
sudo cp -r /root/.kube/ ~/.kube/
831831
sudo chown -R $(id -un). ~/.kube/
832832
833-
- name: Install Kube-OVN
833+
- name: Install Kube-OVN with Cilium chaining
834834
working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }}
835835
run: |
836836
version=$(grep -E '^VERSION="v([0-9]+\.){2}[0-9]+"$' dist/images/install.sh | head -n1 | awk -F= '{print $2}' | tr -d '"')
837837
docker pull kubeovn/kube-ovn:$version
838-
VERSION=$version make kind-install
838+
VERSION=$version make kind-install-cilium-chaining
839839
840840
- name: Run E2E
841+
env:
842+
E2E_CILIUM_CHAINING: "true"
841843
run: make k8s-conformance-e2e
842844

843845
- name: Cleanup

Makefile

+7-11
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ CONTROL_PLANE_TAINTS = node-role.kubernetes.io/master node-role.kubernetes.io/co
1515
MULTUS_IMAGE = ghcr.io/k8snetworkplumbingwg/multus-cni:stable
1616
MULTUS_YAML = https://raw.githubusercontent.com/k8snetworkplumbingwg/multus-cni/master/deployments/multus-daemonset.yml
1717

18-
CILIUM_VERSION = 1.11.6
18+
CILIUM_VERSION = 1.12.7
1919
CILIUM_IMAGE_REPO = quay.io/cilium/cilium
2020

2121
VPC_NAT_GW_IMG = $(REGISTRY)/vpc-nat-gateway:$(VERSION)
@@ -271,10 +271,6 @@ kind-init-ipv6:
271271
kind-init-dual:
272272
@ip_family=dual $(MAKE) kind-init
273273

274-
.PHONY: kind-init-cilium
275-
kind-init-cilium:
276-
@kube_proxy_mode=iptables $(MAKE) kind-init
277-
278274
.PHONY: kind-load-image
279275
kind-load-image:
280276
$(call kind_load_image,kube-ovn,$(REGISTRY)/kube-ovn:$(VERSION))
@@ -480,28 +476,28 @@ kind-install-lb-svc: kind-load-image kind-untaint-control-plane
480476
ENABLE_LB_SVC=true CNI_CONFIG_PRIORITY=10 bash
481477
kubectl describe no
482478

483-
.PHONY: kind-install-cilium
484-
kind-install-cilium: kind-load-image kind-untaint-control-plane
479+
.PHONY: kind-install-cilium-chaining
480+
kind-install-cilium-chaining: kind-load-image kind-untaint-control-plane
485481
$(eval KUBERNETES_SERVICE_HOST = $(shell kubectl get nodes kube-ovn-control-plane -o jsonpath='{.status.addresses[0].address}'))
486482
$(call docker_ensure_image_exists,$(CILIUM_IMAGE_REPO):v$(CILIUM_VERSION))
487483
$(call kind_load_image,kube-ovn,$(CILIUM_IMAGE_REPO):v$(CILIUM_VERSION))
488-
kubectl apply -f yamls/chaining.yaml
484+
kubectl apply -f yamls/cilium-chaining.yaml
489485
helm repo add cilium https://helm.cilium.io/
490486
helm install cilium cilium/cilium \
491487
--version $(CILIUM_VERSION) \
492488
--namespace=kube-system \
493489
--set k8sServiceHost=$(KUBERNETES_SERVICE_HOST) \
494490
--set k8sServicePort=6443 \
495491
--set tunnel=disabled \
492+
--set sessionAffinity=true \
496493
--set enableIPv4Masquerade=false \
497-
--set enableIdentityMark=false \
498494
--set cni.chainingMode=generic-veth \
499495
--set cni.customConf=true \
500496
--set cni.configMap=cni-configuration
501497
kubectl -n kube-system rollout status ds cilium --timeout 300s
502-
bash dist/images/cilium.sh
498+
bash dist/images/install-cilium-cli.sh
503499
sed 's/VERSION=.*/VERSION=$(VERSION)/' dist/images/install.sh | \
504-
ENABLE_LB=false ENABLE_NP=false WITHOUT_KUBE_PROXY=true CNI_CONFIG_PRIORITY=10 bash
500+
ENABLE_LB=false ENABLE_NP=false CNI_CONFIG_PRIORITY=10 bash
505501
kubectl describe no
506502

507503
.PHONY: kind-reload

Makefile.e2e

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
E2E_BRANCH := $(shell echo $${E2E_BRANCH:-master})
22
E2E_IP_FAMILY := $(shell echo $${E2E_IP_FAMILY:-ipv4})
33
E2E_NETWORK_MODE := $(shell echo $${E2E_NETWORK_MODE:-overlay})
4+
E2E_CILIUM_CHAINING = $(shell echo $${E2E_CILIUM_CHAINING:-false})
45

56
K8S_CONFORMANCE_E2E_FOCUS = "sig-network.*Conformance" "sig-network.*Feature:NoSNAT"
67
K8S_CONFORMANCE_E2E_SKIP = "sig-network.*Services.*session affinity"

dist/images/.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
build.sh
22
install.sh
3+
install-cilium-cli.sh
34
ovn-ic-db-docker.sh
45
generate-ssl-docker.sh
56
cleanup.sh

dist/images/cilium.sh

-7
This file was deleted.

dist/images/install-cilium-cli.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/master/stable.txt)
6+
CILIUM_CLI_ARCH=amd64
7+
if [ "$(uname -m)" = "aarch64" ]; then
8+
CILIUM_CLI_ARCH=arm64
9+
fi
10+
11+
curl -L --fail --remote-name-all https://github.com/cilium/cilium-cli/releases/download/${CILIUM_CLI_VERSION}/cilium-linux-${CILIUM_CLI_ARCH}.tar.gz{,.sha256sum}
12+
if command -v sha256sum >/dev/null; then
13+
sha256sum --check cilium-linux-${CILIUM_CLI_ARCH}.tar.gz.sha256sum
14+
fi
15+
sudo tar xzvfC cilium-linux-${CILIUM_CLI_ARCH}.tar.gz /usr/local/bin
16+
rm cilium-linux-${CILIUM_CLI_ARCH}.tar.gz{,.sha256sum}
File renamed without changes.

0 commit comments

Comments
 (0)