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

bzp2010 pushed a commit to branch bzp/feat-adc-rust-003000
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git

commit 24a5602e4e5a12d9320145045aa4ad71dd8b48fd
Author: bzp2010 <[email protected]>
AuthorDate: Thu Aug 27 12:15:17 2026 +0800

    test: add adc rust variant for e2e
---
 .github/adc-rust/Dockerfile           | 13 +++++++++
 .github/adc-rust/entrypoint.sh        | 12 ++++++++
 .github/workflows/apisix-e2e-test.yml | 54 ++++++++++++++++++++++++++++++++---
 3 files changed, 75 insertions(+), 4 deletions(-)

diff --git a/.github/adc-rust/Dockerfile b/.github/adc-rust/Dockerfile
new file mode 100644
index 00000000..1ad79d10
--- /dev/null
+++ b/.github/adc-rust/Dockerfile
@@ -0,0 +1,13 @@
+# Wraps the Rust adc release binary (downloaded by the workflow into the
+# build context as `adc`) into an image shaped enough like ghcr.io/api7/adc
+# to stand in for it as the ingress sidecar in e2e tests.
+FROM ubuntu:24.04
+
+RUN apt-get update && apt-get install -y --no-install-recommends 
ca-certificates \
+    && rm -rf /var/lib/apt/lists/*
+
+COPY adc /usr/local/bin/adc
+COPY entrypoint.sh /entrypoint.sh
+RUN chmod +x /usr/local/bin/adc /entrypoint.sh
+
+ENTRYPOINT ["/entrypoint.sh"]
diff --git a/.github/adc-rust/entrypoint.sh b/.github/adc-rust/entrypoint.sh
new file mode 100644
index 00000000..96fc2cac
--- /dev/null
+++ b/.github/adc-rust/entrypoint.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+# The ingress deployment manifest (test/e2e/framework/manifests/ingress.yaml)
+# invokes the sidecar as `server ...`, the Node adc CLI's subcommand name.
+# The Rust adc CLI (as of the v0.30.0 release binary this image wraps) calls
+# the same subcommand `ingress-server` instead, so translate here rather
+# than touching the shared manifest.
+set -e
+if [ "$1" = "server" ]; then
+  shift
+  set -- ingress-server "$@"
+fi
+exec /usr/local/bin/adc "$@"
diff --git a/.github/workflows/apisix-e2e-test.yml 
b/.github/workflows/apisix-e2e-test.yml
index 5ff5a09d..0182d101 100644
--- a/.github/workflows/apisix-e2e-test.yml
+++ b/.github/workflows/apisix-e2e-test.yml
@@ -31,11 +31,15 @@ concurrency:
 
 env:
   ADC_VERSION: dev
+  ADC_RUST_VERSION: "0.30.0"
 
 jobs:
   e2e-test:
     strategy:
       matrix:
+        adc_impl:
+        - node
+        - rust
         provider_type:
         - apisix-standalone
         - apisix
@@ -91,8 +95,8 @@ jobs:
         run: |
           make install
 
-      - name: Extract adc binary
-        if: ${{ env.ADC_VERSION == 'dev' }}
+      - name: Setup adc (node)
+        if: ${{ env.ADC_VERSION == 'dev' && matrix.adc_impl == 'node' }}
         run: |
           docker create --name adc-temp ghcr.io/api7/adc:dev
           # main.cjs lives in the image's WORKDIR, not at the container root,
@@ -102,6 +106,24 @@ jobs:
           node $(pwd)/adc.js -v
           echo "ADC_BIN=node $(pwd)/adc.js" >> $GITHUB_ENV
 
+      - name: Setup adc (rust)
+        if: ${{ matrix.adc_impl == 'rust' }}
+        run: |
+          curl -fsSL -o adc.tar.gz 
"https://github.com/api7/adc/releases/download/v${{ env.ADC_RUST_VERSION 
}}/adc_rust_${{ env.ADC_RUST_VERSION }}_linux_amd64.tar.gz"
+          tar -xzf adc.tar.gz adc
+          chmod +x adc
+          ./adc --version
+
+          # The pod manifest points ADCImage at a real image, unlike ADC_BIN
+          # (a bare host path the test scaffold execs directly) — the Rust
+          # binary needs to be wrapped in one to stand in as the sidecar.
+          cp .github/adc-rust/Dockerfile .github/adc-rust/entrypoint.sh ./
+          docker build -t adc-rust:dev -f Dockerfile .
+          kind load docker-image adc-rust:dev --name apisix-ingress-cluster
+
+          echo "ADC_BIN=$(pwd)/adc" >> $GITHUB_ENV
+          echo "ADC_IMAGE=adc-rust:dev" >> $GITHUB_ENV
+
       - name: Start OpenLDAP server
         run: make e2e-ldap
 
@@ -120,6 +142,12 @@ jobs:
           fi
 
   disable-gateway-api:
+    strategy:
+      matrix:
+        adc_impl:
+        - node
+        - rust
+      fail-fast: false
     runs-on: ubuntu-latest
     steps:
       - name: Checkout
@@ -163,8 +191,8 @@ jobs:
         run: |
           make kind-load-images
 
-      - name: Extract adc binary
-        if: ${{ env.ADC_VERSION == 'dev' }}
+      - name: Setup adc (node)
+        if: ${{ env.ADC_VERSION == 'dev' && matrix.adc_impl == 'node' }}
         run: |
           docker create --name adc-temp ghcr.io/api7/adc:dev
           # main.cjs lives in the image's WORKDIR, not at the container root,
@@ -174,6 +202,24 @@ jobs:
           node $(pwd)/adc.js -v
           echo "ADC_BIN=node $(pwd)/adc.js" >> $GITHUB_ENV
 
+      - name: Setup adc (rust)
+        if: ${{ matrix.adc_impl == 'rust' }}
+        run: |
+          curl -fsSL -o adc.tar.gz 
"https://github.com/api7/adc/releases/download/v${{ env.ADC_RUST_VERSION 
}}/adc_rust_${{ env.ADC_RUST_VERSION }}_linux_amd64.tar.gz"
+          tar -xzf adc.tar.gz adc
+          chmod +x adc
+          ./adc --version
+
+          # The pod manifest points ADCImage at a real image, unlike ADC_BIN
+          # (a bare host path the test scaffold execs directly) — the Rust
+          # binary needs to be wrapped in one to stand in as the sidecar.
+          cp .github/adc-rust/Dockerfile .github/adc-rust/entrypoint.sh ./
+          docker build -t adc-rust:dev -f Dockerfile .
+          kind load docker-image adc-rust:dev --name apisix-ingress-cluster
+
+          echo "ADC_BIN=$(pwd)/adc" >> $GITHUB_ENV
+          echo "ADC_IMAGE=adc-rust:dev" >> $GITHUB_ENV
+
       - name: Install CRDs
         run: make install-crds
 

Reply via email to