From 1d3c3e2980144a5c9c706d6b51b12f10088c66d1 Mon Sep 17 00:00:00 2001 From: safiya2610 Date: Sun, 16 Aug 2026 15:49:19 +0530 Subject: [PATCH] ci: fix CNI initialization failure in crictl e2e tests Signed-off-by: safiya2610 --- .github/workflows/vm_test.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/vm_test.yml b/.github/workflows/vm_test.yml index 446de3723..abdae50e4 100644 --- a/.github/workflows/vm_test.yml +++ b/.github/workflows/vm_test.yml @@ -197,6 +197,37 @@ jobs: sudo mkdir -p /opt/cni/bin sudo tar Cxzvf /opt/cni/bin "cni-plugins-linux-$(dpkg --print-architecture)-v${SAFE_CNI}.tgz" rm -f "cni-plugins-linux-$(dpkg --print-architecture)-v${SAFE_CNI}.tgz" + sudo mkdir -p /etc/cni/net.d + sudo tee /etc/cni/net.d/10-containerd-net.conflist > /dev/null <<'EOF' +{ + "cniVersion": "1.0.0", + "name": "containerd-net", + "plugins": [ + { + "type": "bridge", + "bridge": "cni0", + "isGateway": true, + "ipMasq": true, + "promiscMode": true, + "ipam": { + "type": "host-local", + "ranges": [ + [{ + "subnet": "10.88.0.0/16" + }] + ], + "routes": [ + { "dst": "0.0.0.0/0" } + ] + } + }, + { + "type": "portmap", + "capabilities": {"portMappings": true} + } + ] +} +EOF - name: Install nerdctl env: