Skip to content

Commit ef95db6

Browse files
committed
adding CNCF runner
Signed-off-by: KMAnju-2021 <[email protected]>
1 parent b5f3713 commit ef95db6

File tree

2 files changed

+59
-3
lines changed

2 files changed

+59
-3
lines changed

.github/workflows/kind.yml

+33
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,39 @@ jobs:
277277
path: log.tar.gz
278278
retention-days: 30
279279

280+
test-e2e-ipam-feature-enabled:
281+
name: E2e tests on a Kind cluster on Linux with FlexibleIPAM feature enabled
282+
needs: [build-antrea-coverage-image]
283+
runs-on: [ubuntu-latest-4-cores]
284+
steps:
285+
- name: Free disk space
286+
# https://github.com/actions/virtual-environments/issues/709
287+
run: |
288+
sudo apt-get clean
289+
df -h
290+
- uses: actions/checkout@v4
291+
with:
292+
show-progress: false
293+
- uses: actions/setup-go@v5
294+
with:
295+
go-version-file: 'go.mod'
296+
- name: Download Antrea image from previous job
297+
uses: actions/download-artifact@v4
298+
with:
299+
name: antrea-ubuntu-cov
300+
- name: Load Antrea image
301+
run: |
302+
docker load -i antrea-ubuntu.tar
303+
- name: Install Kind
304+
run: |
305+
KIND_VERSION=$(head -n1 ./ci/kind/version)
306+
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-$(uname)-amd64
307+
chmod +x ./kind
308+
sudo mv kind /usr/local/bin
309+
- name: Run ipam e2e tests
310+
run: |
311+
./ci/kind/test-e2e-kind.sh --flexible-ipam --encap-mode noEncap
312+
280313
test-e2e-noencap:
281314
name: E2e tests on a Kind cluster on Linux (noEncap)
282315
needs: [build-antrea-coverage-image]

ci/kind/test-e2e-kind.sh

+26-3
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ setup_only=false
8989
cleanup_only=false
9090
test_only=false
9191
run=""
92+
flexible_ipam=false
9293
antrea_controller_image="antrea/antrea-controller-ubuntu"
9394
antrea_agent_image="antrea/antrea-agent-ubuntu"
9495
use_non_default_images=false
@@ -110,6 +111,10 @@ case $key in
110111
proxy_all=true
111112
shift
112113
;;
114+
--flexible-ipam)
115+
flexible_ipam=true
116+
shift
117+
;;
113118
--no-kube-proxy)
114119
no_kube_proxy=true
115120
shift
@@ -249,6 +254,10 @@ if $flow_visibility; then
249254
manifest_args="$manifest_args --feature-gates FlowExporter=true,L7FlowExporter=true --extra-helm-values-file $FLOW_VISIBILITY_HELM_VALUES"
250255
fi
251256

257+
if $flexible_ipam; then
258+
manifest_args="$manifest_args --flexible-ipam --multicast"
259+
fi
260+
252261
COMMON_IMAGES_LIST=("registry.k8s.io/e2e-test-images/agnhost:2.40" \
253262
"antrea/nginx:1.21.6-alpine" \
254263
"antrea/toolbox:1.3-0")
@@ -302,6 +311,10 @@ if $extra_vlan; then
302311
fi
303312
fi
304313

314+
if $flexible_ipam; then
315+
vlan_args="$vlan_args --vlan-subnets 11=192.168.241.1/24 --vlan-subnets 12=192.168.242.1/24"
316+
fi
317+
305318
function setup_cluster {
306319
args=$1
307320

@@ -348,8 +361,13 @@ function run_test {
348361
timeout="80m"
349362
coverage_args="--coverage --coverage-dir $ANTREA_COV_DIR"
350363
else
351-
$YML_CMD --encap-mode $current_mode $manifest_args | docker exec -i kind-control-plane dd of=/root/antrea.yml
352-
$YML_CMD --ipsec $manifest_args | docker exec -i kind-control-plane dd of=/root/antrea-ipsec.yml
364+
if $flexible_ipam; then
365+
$YML_CMD --flexible-ipam --multicast --encap-mode $current_mode $manifest_args | docker exec -i kind-control-plane dd of=/root/antrea.yml
366+
echo "debug-1"
367+
else
368+
$YML_CMD --encap-mode $current_mode $manifest_args | docker exec -i kind-control-plane dd of=/root/antrea.yml
369+
$YML_CMD --ipsec $manifest_args | docker exec -i kind-control-plane dd of=/root/antrea-ipsec.yml
370+
fi
353371
timeout="75m"
354372
fi
355373

@@ -401,7 +419,12 @@ function run_test {
401419
EXTRA_ARGS="$EXTRA_ARGS --external-frr-cid $external_frr_cid --external-frr-ips $external_frr_ips"
402420
fi
403421

404-
go test -v -timeout=$timeout $RUN_OPT antrea.io/antrea/test/e2e $flow_visibility_args -provider=kind --logs-export-dir=$ANTREA_LOG_DIR $np_evaluation_flag --skip-cases=$skiplist $coverage_args $EXTRA_ARGS
422+
if $flexible_ipam; then
423+
export GO111MODULE=on
424+
go test -v antrea.io/antrea/test/e2e --provider kind -timeout=100m --prometheus --antrea-ipam
425+
else
426+
go test -v -timeout=$timeout $RUN_OPT antrea.io/antrea/test/e2e $flow_visibility_args -provider=kind --logs-export-dir=$ANTREA_LOG_DIR $np_evaluation_flag --skip-cases=$skiplist $coverage_args $EXTRA_ARGS
427+
fi
405428

406429
if $coverage; then
407430
pushd $ANTREA_COV_DIR

0 commit comments

Comments
 (0)