@@ -12,6 +12,7 @@ GATEWAY_RELEASE_URL ?= https://github.com/kubernetes-sigs/gateway-api/releases/d
12
12
13
13
WAIT_TIMEOUT ?= 15m
14
14
15
+ IP_FAMILY ?= ipv4
15
16
BENCHMARK_TIMEOUT ?= 60m
16
17
BENCHMARK_CPU_LIMITS ?= 1000m
17
18
BENCHMARK_MEMORY_LIMITS ?= 1024Mi
@@ -35,11 +36,23 @@ ifeq ($(origin KUBE_INFRA_DIR),undefined)
35
36
KUBE_INFRA_DIR := $(ROOT_DIR ) /internal/infrastructure/kubernetes/config
36
37
endif
37
38
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
+
38
47
# #@ Kubernetes Development
39
48
40
49
YEAR := $(shell date +% Y)
41
50
CONTROLLERGEN_OBJECT_FLAGS := object:headerFile="$(ROOT_DIR ) /tools/boilerplate/boilerplate.generatego.txt",year=$(YEAR )
42
51
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
+
43
56
.PHONY : manifests
44
57
manifests : $(tools/controller-gen ) generate-gwapi-manifests # # Generate WebhookConfiguration and CustomResourceDefinition objects.
45
58
@$(LOG_TARGET )
@@ -145,7 +158,7 @@ install-ratelimit:
145
158
kubectl wait --timeout=5m -n envoy-gateway-system deployment/envoy-ratelimit --for=condition=Available
146
159
147
160
.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
149
162
@$(LOG_TARGET )
150
163
kubectl wait --timeout=5m -n envoy-gateway-system deployment/envoy-ratelimit --for=condition=Available
151
164
kubectl wait --timeout=5m -n envoy-gateway-system deployment/envoy-gateway --for=condition=Available
165
178
endif
166
179
167
180
.PHONY : run-benchmark
168
- run-benchmark : install-benchmark-server # # Run benchmark tests
181
+ run-benchmark : install-benchmark-server prepare-ip-family # # Run benchmark tests
169
182
@$(LOG_TARGET )
170
183
mkdir -p $(OUTPUT_DIR ) /benchmark
171
184
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
221
234
tools/hack/kind-load-image.sh $(IMAGE ) $(TAG )
222
235
223
236
.PHONY : run-conformance
224
- run-conformance : # # Run Gateway API conformance.
237
+ run-conformance : prepare-ip-family # # Run Gateway API conformance.
225
238
@$(LOG_TARGET )
226
239
kubectl wait --timeout=$(WAIT_TIMEOUT ) -n envoy-gateway-system deployment/envoy-gateway --for=condition=Available
227
240
kubectl apply -f test/config/gatewayclass.yaml
@@ -230,7 +243,7 @@ run-conformance: ## Run Gateway API conformance.
230
243
CONFORMANCE_REPORT_PATH ?=
231
244
232
245
.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.
234
247
@$(LOG_TARGET )
235
248
kubectl wait --timeout=$(WAIT_TIMEOUT ) -n envoy-gateway-system deployment/envoy-gateway --for=condition=Available
236
249
kubectl apply -f test/config/gatewayclass.yaml
0 commit comments