This is an automated email from the ASF dual-hosted git repository.

AlinsRan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git


The following commit(s) were added to refs/heads/master by this push:
     new 5dec3436 ci: load only the node platform into kind with the containerd 
image store (#2907)
5dec3436 is described below

commit 5dec343689ec643d2c1d22a4f519a4da65ec236e
Author: AlinsRan <[email protected]>
AuthorDate: Wed Oct 28 17:26:33 2026 +0800

    ci: load only the node platform into kind with the containerd image store 
(#2907)
---
 .github/workflows/benchmark-test.yml |  8 +++-----
 Makefile                             | 25 +++++++++++++++++++------
 test/e2e/crds/v2/streamroute.go      |  3 +++
 3 files changed, 25 insertions(+), 11 deletions(-)

diff --git a/.github/workflows/benchmark-test.yml 
b/.github/workflows/benchmark-test.yml
index ae08aa83..2cbbb161 100644
--- a/.github/workflows/benchmark-test.yml
+++ b/.github/workflows/benchmark-test.yml
@@ -98,12 +98,10 @@ jobs:
         if: ${{ env.ADC_VERSION == 'dev' }}
         run: |
           docker create --name adc-temp ghcr.io/api7/adc:dev
-          # main.cjs lives in the image's WORKDIR, not at the container root,
-          # and docker cp resolves a relative SRC_PATH against the root.
-          docker cp "adc-temp:$(docker inspect -f '{{.Config.WorkingDir}}' 
adc-temp)/main.cjs" adc.js
+          docker cp adc-temp:/adc adc
           docker rm adc-temp
-          node $(pwd)/adc.js -v
-          echo "ADC_BIN=node $(pwd)/adc.js" >> $GITHUB_ENV
+          ./adc --version
+          echo "ADC_BIN=$(pwd)/adc" >> $GITHUB_ENV
 
       - name: Run Benchmark Test
         shell: bash
diff --git a/Makefile b/Makefile
index 0b02cf50..8154940e 100644
--- a/Makefile
+++ b/Makefile
@@ -248,22 +248,35 @@ kind-down:
                && kind delete cluster --name $(KIND_NAME) \
                || echo "kind cluster does not exist"
 
+# kind imports images with `ctr import --all-platforms`. With Docker's 
containerd
+# image store, `docker save` exports every platform of a pulled multi-platform 
image
+# although only one was pulled, so the import fails; save only the node 
platform.
+define kind-load-image
+       @if docker info -f '{{.DriverStatus}}' | grep -q 
io.containerd.snapshotter; then \
+               archive=$$(mktemp) && trap 'rm -f "$$archive"' EXIT && \
+               docker save --platform "$$(docker version -f 
'{{.Server.Os}}/{{.Server.Arch}}')" -o "$$archive" $(1) && \
+               kind load image-archive "$$archive" --name $(KIND_NAME); \
+       else \
+               kind load docker-image $(1) --name $(KIND_NAME); \
+       fi
+endef
+
 .PHONY: kind-load-images
 kind-load-images: pull-infra-images kind-load-ingress-image kind-load-adc-image
-       @kind load docker-image kennethreitz/httpbin:latest --name $(KIND_NAME)
-       @kind load docker-image jmalloc/echo-server:latest --name $(KIND_NAME)
-       @kind load docker-image openresty/openresty:1.27.1.2-4-bullseye-fat 
--name $(KIND_NAME)
-       @kind load docker-image alpine/curl:8.17.0 --name $(KIND_NAME)
+       $(call kind-load-image,kennethreitz/httpbin:latest)
+       $(call kind-load-image,jmalloc/echo-server:latest)
+       $(call kind-load-image,openresty/openresty:1.27.1.2-4-bullseye-fat)
+       $(call kind-load-image,alpine/curl:8.17.0)
 
 .PHONY: kind-load-ingress-image
 kind-load-ingress-image:
-       @kind load docker-image $(IMG) --name $(KIND_NAME)
+       $(call kind-load-image,$(IMG))
 
 .PHONY: kind-load-adc-image
 kind-load-adc-image:
        @docker pull ghcr.io/api7/adc:$(ADC_VERSION)
        @docker tag ghcr.io/api7/adc:$(ADC_VERSION) ghcr.io/api7/adc:dev
-       @kind load docker-image ghcr.io/api7/adc:dev --name $(KIND_NAME)
+       $(call kind-load-image,ghcr.io/api7/adc:dev)
 
 .PHONY: pull-infra-images
 pull-infra-images:
diff --git a/test/e2e/crds/v2/streamroute.go b/test/e2e/crds/v2/streamroute.go
index b27455b0..db2079f7 100644
--- a/test/e2e/crds/v2/streamroute.go
+++ b/test/e2e/crds/v2/streamroute.go
@@ -218,6 +218,9 @@ spec:
       containers:
       - name: mosquito
         image: eclipse-mosquitto:1.6
+        # Skip the image's all-comment config file: Ubuntu hosts ship an 
AppArmor
+        # profile for /usr/sbin/mosquitto that denies reading it inside kind.
+        args: ["/usr/sbin/mosquitto"]
         livenessProbe:
           tcpSocket:
             port: 1883

Reply via email to