Skip to content

Commit 8cba958

Browse files
authored
ci: enable ipv6 test (#4853)
enable ipv6 test Signed-off-by: zirain <[email protected]>
1 parent ac86045 commit 8cba958

9 files changed

+38
-8
lines changed

.github/workflows/build_and_test.yaml

+2-4
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,7 @@ jobs:
120120
- version: v1.29.8
121121
ipFamily: ipv4
122122
- version: v1.30.4
123-
ipFamily: ipv4
124-
# Enable these after https://github.com/envoyproxy/gateway/issues/4572 fixed
125-
# - version: v1.31.0
126-
# ipFamily: ipv6 # only run ipv6 test on latest version to save time
123+
ipFamily: ipv6 # only run ipv6 test on this version to save time
127124
# TODO: this's IPv4 first, need a way to test IPv6 first.
128125
- version: v1.31.0
129126
ipFamily: dual # only run dual test on latest version to save time
@@ -148,6 +145,7 @@ jobs:
148145
KIND_NODE_TAG: ${{ matrix.target.version }}
149146
IMAGE_PULL_POLICY: IfNotPresent
150147
IP_FAMILY: ${{ matrix.target.ipFamily }}
148+
E2E_TIMEOUT: 1h
151149
run: make e2e
152150

153151
benchmark-test:

test/config/gatewayclass.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ metadata:
1616
name: proxy-config
1717
namespace: envoy-gateway-system
1818
spec:
19+
ipFamily: IPv4
1920
provider:
2021
type: Kubernetes
2122
kubernetes:
@@ -124,6 +125,7 @@ metadata:
124125
name: upgrade-config
125126
namespace: envoy-gateway-system
126127
spec:
128+
ipFamily: IPv4
127129
provider:
128130
type: Kubernetes
129131
kubernetes:
@@ -158,6 +160,7 @@ metadata:
158160
name: merge-gateways-config
159161
namespace: envoy-gateway-system
160162
spec:
163+
ipFamily: IPv4
161164
mergeGateways: true
162165
---
163166
kind: GatewayClass
@@ -166,12 +169,22 @@ metadata:
166169
name: internet
167170
spec:
168171
controllerName: gateway.envoyproxy.io/gatewayclass-controller
172+
parametersRef:
173+
group: gateway.envoyproxy.io
174+
kind: EnvoyProxy
175+
name: proxy-config
176+
namespace: envoy-gateway-system
169177
---
170178
kind: GatewayClass
171179
apiVersion: gateway.networking.k8s.io/v1
172180
metadata:
173181
name: private
174182
spec:
175183
controllerName: gateway.envoyproxy.io/gatewayclass-controller
184+
parametersRef:
185+
group: gateway.envoyproxy.io
186+
kind: EnvoyProxy
187+
name: proxy-config
188+
namespace: envoy-gateway-system
176189
---
177190

test/e2e/testdata/envoyproxy-daemonset.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ metadata:
2424
name: eg-daemonset
2525
namespace: gateway-conformance-infra
2626
spec:
27+
ipFamily: IPv4
2728
provider:
2829
type: Kubernetes
2930
kubernetes:

test/e2e/testdata/gateway-with-envoyproxy.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ metadata:
2424
namespace: gateway-conformance-infra
2525
name: test
2626
spec:
27+
ipFamily: IPv4
2728
routingType: Service
2829
---
2930
apiVersion: gateway.networking.k8s.io/v1

test/e2e/testdata/httproute-routingtype.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: custom-proxy-config
55
namespace: gateway-conformance-infra
66
spec:
7+
ipFamily: IPv4
78
routingType: Service
89
---
910
apiVersion: gateway.networking.k8s.io/v1

test/e2e/testdata/tracing-datadog.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ metadata:
3939
name: datadog-tracing
4040
namespace: gateway-conformance-infra
4141
spec:
42+
ipFamily: IPv4
4243
logging:
4344
level:
4445
default: debug

test/e2e/testdata/tracing-zipkin.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ metadata:
2626
name: zipkin-tracing
2727
namespace: gateway-conformance-infra
2828
spec:
29+
ipFamily: IPv4
2930
logging:
3031
level:
3132
default: debug

test/e2e/upgrade/manifests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ metadata:
1818
name: upgrade-config
1919
namespace: envoy-gateway-system
2020
spec:
21+
ipFamily: IPv4
2122
provider:
2223
type: Kubernetes
2324
kubernetes:

tools/make/kube.mk

+17-4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ GATEWAY_RELEASE_URL ?= https://github.com/kubernetes-sigs/gateway-api/releases/d
1212

1313
WAIT_TIMEOUT ?= 15m
1414

15+
IP_FAMILY ?= ipv4
1516
BENCHMARK_TIMEOUT ?= 60m
1617
BENCHMARK_CPU_LIMITS ?= 1000m
1718
BENCHMARK_MEMORY_LIMITS ?= 1024Mi
@@ -35,11 +36,23 @@ ifeq ($(origin KUBE_INFRA_DIR),undefined)
3536
KUBE_INFRA_DIR := $(ROOT_DIR)/internal/infrastructure/kubernetes/config
3637
endif
3738

39+
ifeq ($(IP_FAMILY),ipv4)
40+
ENVOY_PROXY_IP_FAMILY := IPv4
41+
else ifeq ($(IP_FAMILY),ipv6)
42+
ENVOY_PROXY_IP_FAMILY := IPv6
43+
else ifeq ($(IP_FAMILY),dual)
44+
ENVOY_PROXY_IP_FAMILY := DualStack
45+
endif
46+
3847
##@ Kubernetes Development
3948

4049
YEAR := $(shell date +%Y)
4150
CONTROLLERGEN_OBJECT_FLAGS := object:headerFile="$(ROOT_DIR)/tools/boilerplate/boilerplate.generatego.txt",year=$(YEAR)
4251

52+
.PHONY: prepare-ip-family
53+
prepare-ip-family:
54+
@find ./test -type f -name "*.yaml" | xargs sed -i -e 's/ipFamily: IPv4/ipFamily: $(ENVOY_PROXY_IP_FAMILY)/g'
55+
4356
.PHONY: manifests
4457
manifests: $(tools/controller-gen) generate-gwapi-manifests ## Generate WebhookConfiguration and CustomResourceDefinition objects.
4558
@$(LOG_TARGET)
@@ -145,7 +158,7 @@ install-ratelimit:
145158
kubectl wait --timeout=5m -n envoy-gateway-system deployment/envoy-ratelimit --for=condition=Available
146159

147160
.PHONY: e2e-prepare
148-
e2e-prepare: ## Prepare the environment for running e2e tests
161+
e2e-prepare: prepare-ip-family ## Prepare the environment for running e2e tests
149162
@$(LOG_TARGET)
150163
kubectl wait --timeout=5m -n envoy-gateway-system deployment/envoy-ratelimit --for=condition=Available
151164
kubectl wait --timeout=5m -n envoy-gateway-system deployment/envoy-gateway --for=condition=Available
@@ -165,7 +178,7 @@ else
165178
endif
166179

167180
.PHONY: run-benchmark
168-
run-benchmark: install-benchmark-server ## Run benchmark tests
181+
run-benchmark: install-benchmark-server prepare-ip-family ## Run benchmark tests
169182
@$(LOG_TARGET)
170183
mkdir -p $(OUTPUT_DIR)/benchmark
171184
kubectl wait --timeout=$(WAIT_TIMEOUT) -n benchmark-test deployment/nighthawk-test-server --for=condition=Available
@@ -221,7 +234,7 @@ kube-install-image: image.build $(tools/kind) ## Install the EG image to a kind
221234
tools/hack/kind-load-image.sh $(IMAGE) $(TAG)
222235

223236
.PHONY: run-conformance
224-
run-conformance: ## Run Gateway API conformance.
237+
run-conformance: prepare-ip-family ## Run Gateway API conformance.
225238
@$(LOG_TARGET)
226239
kubectl wait --timeout=$(WAIT_TIMEOUT) -n envoy-gateway-system deployment/envoy-gateway --for=condition=Available
227240
kubectl apply -f test/config/gatewayclass.yaml
@@ -230,7 +243,7 @@ run-conformance: ## Run Gateway API conformance.
230243
CONFORMANCE_REPORT_PATH ?=
231244

232245
.PHONY: run-experimental-conformance
233-
run-experimental-conformance: ## Run Experimental Gateway API conformance.
246+
run-experimental-conformance: prepare-ip-family ## Run Experimental Gateway API conformance.
234247
@$(LOG_TARGET)
235248
kubectl wait --timeout=$(WAIT_TIMEOUT) -n envoy-gateway-system deployment/envoy-gateway --for=condition=Available
236249
kubectl apply -f test/config/gatewayclass.yaml

0 commit comments

Comments
 (0)