Skip to content

Commit c61b54a

Browse files
committed
fix: r
Signed-off-by: Ashing Zheng <[email protected]>
1 parent 9276c50 commit c61b54a

File tree

7 files changed

+14
-69
lines changed

7 files changed

+14
-69
lines changed

.github/workflows/apisix-e2e-test.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,6 @@ jobs:
7676
echo "building images..."
7777
make build-image
7878
79-
- name: Extract adc binary
80-
run: |
81-
echo "Extracting adc binary..."
82-
docker create --name adc-temp api7/api7-ingress-controller:dev
83-
docker cp adc-temp:/bin/adc /usr/local/bin/adc
84-
docker rm adc-temp
85-
chmod +x /usr/local/bin/adc
86-
echo "ADC binary extracted to /usr/local/bin/adc"
87-
8879
- name: Launch Kind Cluster
8980
run: |
9081
make kind-up

.github/workflows/e2e-test-k8s.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,6 @@ jobs:
8989
echo "building images..."
9090
make build-image
9191
92-
- name: Extract adc binary
93-
run: |
94-
echo "Extracting adc binary..."
95-
docker create --name adc-temp api7/api7-ingress-controller:dev
96-
docker cp adc-temp:/bin/adc /usr/local/bin/adc
97-
docker rm adc-temp
98-
chmod +x /usr/local/bin/adc
99-
echo "ADC binary extracted to /usr/local/bin/adc"
100-
10192
- name: Install v2 CRDs
10293
run: |
10394
make install-crds-nocel

.github/workflows/e2e-test.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,6 @@ jobs:
9494
echo "building images..."
9595
make build-image
9696
97-
- name: Extract adc binary
98-
run: |
99-
echo "Extracting adc binary..."
100-
docker create --name adc-temp api7/api7-ingress-controller:dev
101-
docker cp adc-temp:/bin/adc /usr/local/bin/adc
102-
docker rm adc-temp
103-
chmod +x /usr/local/bin/adc
104-
echo "ADC binary extracted to /usr/local/bin/adc"
105-
10697
- name: Launch Kind Cluster
10798
run: |
10899
make kind-up

Dockerfile

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,12 @@
1717

1818
ARG BASE_IMAGE_TAG=nonroot
1919

20-
FROM debian:bullseye-slim AS deps
21-
WORKDIR /workspace
22-
23-
ARG TARGETARCH
24-
ARG ADC_VERSION
25-
26-
RUN apt update \
27-
&& apt install -y wget \
28-
&& wget https://github.com/api7/adc/releases/download/v${ADC_VERSION}/adc_${ADC_VERSION}_linux_${TARGETARCH}.tar.gz -O adc.tar.gz \
29-
&& tar -zxvf adc.tar.gz \
30-
&& mv adc /bin/adc \
31-
&& rm -rf adc.tar.gz \
32-
&& apt autoremove -y wget
33-
3420
FROM gcr.io/distroless/cc-debian12:${BASE_IMAGE_TAG}
3521

3622
ARG TARGETARCH
3723

3824
WORKDIR /app
3925

40-
COPY --from=deps /bin/adc /bin/adc
4126
COPY ./bin/apisix-ingress-controller_${TARGETARCH} ./apisix-ingress-controller
4227
COPY ./config/samples/config.yaml ./conf/config.yaml
4328

Dockerfile.dev

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,12 @@
1717

1818
ARG ENABLE_PROXY=false
1919

20-
FROM node:22 AS node_builder
21-
22-
ARG TARGETARCH
23-
24-
WORKDIR /app
25-
26-
RUN apt update \
27-
&& apt install -y git \
28-
&& git clone --depth 1 --branch main https://github.com/api7/adc.git \
29-
&& cd adc \
30-
&& corepack enable pnpm \
31-
&& pnpm install \
32-
&& NODE_ENV=production npx nx build cli \
33-
&& node --experimental-sea-config apps/cli/node-sea.json \
34-
&& npx ts-node apps/cli/scripts/download-node.ts \
35-
&& npx postject ./node-binary/linux-${TARGETARCH} NODE_SEA_BLOB sea-prep.blob --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \
36-
&& mv ./node-binary/linux-${TARGETARCH} /bin/adc \
37-
&& rm -rf /app
38-
3920
FROM debian:bullseye-slim
4021

4122
ARG TARGETARCH
4223

4324
WORKDIR /app
4425

45-
COPY --from=node_builder /bin/adc /bin/adc
4626
COPY ./bin/apisix-ingress-controller_${TARGETARCH} ./apisix-ingress-controller
4727
COPY ./config/samples/config.yaml ./conf/config.yaml
4828

test/e2e/crds/v2/status.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,13 @@ spec:
179179
err = yaml.Unmarshal([]byte(serviceYaml), &k8sservice)
180180
Expect(err).NotTo(HaveOccurred(), "unmarshalling service")
181181
oldSpec := k8sservice.Spec
182-
k8sservice.Spec.Selector = map[string]string{
183-
"app.kubernetes.io/name": "nonexistent",
182+
if os.Getenv("PROVIDER_TYPE") == adc.BackendModeAPISIX {
183+
k8sservice.Spec.Selector = map[string]string{
184+
"app.kubernetes.io/name": "nonexistent",
185+
}
186+
} else {
187+
k8sservice.Spec.Type = corev1.ServiceTypeExternalName
188+
k8sservice.Spec.ExternalName = "invalid.host"
184189
}
185190
newServiceYaml, err := yaml.Marshal(k8sservice)
186191
Expect(err).NotTo(HaveOccurred(), "marshalling service")

test/e2e/gatewayapi/status.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ spec:
107107
Expect(gwyaml).To(ContainSubstring(`status: "True"`), "checking Gateway condition status")
108108
Expect(gwyaml).To(ContainSubstring("message: the gateway has been accepted by the apisix-ingress-controller"), "checking Gateway condition message")
109109
})
110-
AfterEach(func() {
111-
_ = s.DeleteResource("Gateway", "apisix")
112-
})
113110

114111
FIt("dataplane unavailable", func() {
115112
if os.Getenv("PROVIDER_TYPE") == adc.BackendModeAPI7EE {
@@ -135,8 +132,13 @@ spec:
135132
err = yaml.Unmarshal([]byte(serviceYaml), &k8sservice)
136133
Expect(err).NotTo(HaveOccurred(), "unmarshalling service")
137134
oldSpec := k8sservice.Spec
138-
k8sservice.Spec.Selector = map[string]string{
139-
"app.kubernetes.io/name": "nonexistent",
135+
if os.Getenv("PROVIDER_TYPE") == adc.BackendModeAPISIX {
136+
k8sservice.Spec.Selector = map[string]string{
137+
"app.kubernetes.io/name": "nonexistent",
138+
}
139+
} else {
140+
k8sservice.Spec.Type = corev1.ServiceTypeExternalName
141+
k8sservice.Spec.ExternalName = "invalid.host"
140142
}
141143
newServiceYaml, err := yaml.Marshal(k8sservice)
142144
Expect(err).NotTo(HaveOccurred(), "marshalling service")

0 commit comments

Comments
 (0)