@@ -12,12 +12,23 @@ GW_SVC_GKE_INTERNAL = false
12
12
NGF_VERSION ?= $(shell git describe --tags $(shell git rev-list --tags --max-count=1) ) # # NGF version to be tested (defaults to latest tag)
13
13
PULL_POLICY = Never# # Pull policy for the images
14
14
PROVISIONER_MANIFEST = conformance/provisioner/provisioner.yaml
15
- SUPPORTED_FEATURES = HTTPRouteQueryParamMatching,HTTPRouteMethodMatching,HTTPRoutePortRedirect,HTTPRouteSchemeRedirect,HTTPRouteHostRewrite,HTTPRoutePathRewrite,GatewayPort8080,HTTPRouteResponseHeaderModification,GRPCExactMethodMatching,GRPCRouteListenerHostnameMatching,GRPCRouteHeaderMatching,TLSRoute
15
+ SUPPORTED_EXTENDED_FEATURES = HTTPRouteQueryParamMatching,HTTPRouteMethodMatching,HTTPRoutePortRedirect,HTTPRouteSchemeRedirect,HTTPRouteHostRewrite,HTTPRoutePathRewrite,GatewayPort8080,HTTPRouteResponseHeaderModification
16
+ STANDARD_CONFORMANCE_PROFILES = GATEWAY-HTTP,GATEWAY-GRPC
17
+ EXPERIMENTAL_CONFORMANCE_PROFILES = GATEWAY-TLS
18
+ CONFORMANCE_PROFILES = $(STANDARD_CONFORMANCE_PROFILES ) # by default we use the standard conformance profiles. If experimental is enabled we override this and add the experimental profiles.
19
+ SKIP_TESTS = TLSRouteInvalidReferenceGrant
16
20
17
21
ifneq ($(GINKGO_LABEL ) ,)
18
22
override GINKGO_FLAGS += --label-filter "$(GINKGO_LABEL ) "
19
23
endif
20
24
25
+ # Check if ENABLE_EXPERIMENTAL is true
26
+ ifeq ($(ENABLE_EXPERIMENTAL ) ,true)
27
+ # If true, add the experimental conformance profiles
28
+ CONFORMANCE_PROFILES = $(EXPERIMENTAL_CONFORMANCE_PROFILES ) ,$(STANDARD_CONFORMANCE_PROFILES )
29
+ endif
30
+
31
+
21
32
.PHONY : update-go-modules
22
33
update-go-modules : # # Update the gateway-api go modules to latest main version
23
34
go get -u sigs.k8s.io/gateway-api@main
@@ -35,9 +46,9 @@ run-conformance-tests: ## Run conformance tests
35
46
--image=$(CONFORMANCE_PREFIX ) :$(CONFORMANCE_TAG ) --image-pull-policy=Never \
36
47
--overrides=' { "spec": { "serviceAccountName": "conformance" } }' \
37
48
--restart=Never -- sh -c " go test -v . -tags conformance,experimental -args --gateway-class=$( GATEWAY_CLASS) \
38
- --supported-features=$(SUPPORTED_FEATURES ) --version=$(NGF_VERSION ) --skip-tests=TLSRouteInvalidReferenceGrant \
49
+ --supported-features=$(SUPPORTED_EXTENDED_FEATURES ) --version=$(NGF_VERSION ) --skip-tests=$( SKIP_TESTS ) --conformance-profiles= $( CONFORMANCE_PROFILES ) \
39
50
--report-output=output.txt; cat output.txt" | tee output.txt
40
- ./ scripts/check-pod-exit-code.sh
51
+ bash scripts/check-pod-exit-code.sh
41
52
sed -e ' 1,/CONFORMANCE PROFILE/d' output.txt > conformance-profile.yaml
42
53
rm output.txt
43
54
grpc_core_result=` yq ' .profiles[0].core.result' conformance-profile.yaml` ; \
@@ -78,27 +89,27 @@ setup-gcp-and-run-nfr-tests: create-gke-router create-and-setup-vm nfr-test ## C
78
89
79
90
.PHONY : create-gke-cluster
80
91
create-gke-cluster : # # Create a GKE cluster
81
- ./ scripts/create-gke-cluster.sh $(CI )
92
+ bash scripts/create-gke-cluster.sh $(CI )
82
93
83
94
.PHONY : create-and-setup-vm
84
95
create-and-setup-vm : # # Create and setup a GCP VM for tests
85
- ./ scripts/create-and-setup-gcp-vm.sh
96
+ bash scripts/create-and-setup-gcp-vm.sh
86
97
87
98
.PHONY : create-gke-router
88
99
create-gke-router : # # Create a GKE router to allow egress traffic from private nodes (allows for external image pulls)
89
- ./ scripts/create-gke-router.sh
100
+ bash scripts/create-gke-router.sh
90
101
91
102
.PHONY : sync-files-to-vm
92
103
sync-files-to-vm : # # Syncs your local NGF files with the NGF repo on the VM
93
- ./ scripts/sync-files-to-vm.sh
104
+ bash scripts/sync-files-to-vm.sh
94
105
95
106
.PHONY : run-tests-on-vm
96
107
run-tests-on-vm : # # Run the functional tests on a GCP VM
97
- ./ scripts/run-tests-gcp-vm.sh
108
+ bash scripts/run-tests-gcp-vm.sh
98
109
99
110
.PHONY : nfr-test
100
111
nfr-test : # # Run the NFR tests on a GCP VM
101
- NFR=true CI=$(CI ) ./ scripts/run-tests-gcp-vm.sh
112
+ NFR=true CI=$(CI ) bash scripts/run-tests-gcp-vm.sh
102
113
103
114
.PHONY : start-longevity-test
104
115
start-longevity-test : export START_LONGEVITY=true
@@ -136,19 +147,19 @@ cleanup-gcp: cleanup-router cleanup-vm delete-gke-cluster ## Cleanup all GCP res
136
147
137
148
.PHONY : cleanup-router
138
149
cleanup-router : # # Delete the GKE router
139
- ./ scripts/cleanup-router.sh
150
+ bash scripts/cleanup-router.sh
140
151
141
152
.PHONY : cleanup-vm
142
153
cleanup-vm : # # Delete the test GCP VM and delete the firewall rule
143
- ./ scripts/cleanup-vm.sh
154
+ bash scripts/cleanup-vm.sh
144
155
145
156
.PHONY : delete-gke-cluster
146
157
delete-gke-cluster : # # Delete the GKE cluster
147
- ./ scripts/delete-gke-cluster.sh
158
+ bash scripts/delete-gke-cluster.sh
148
159
149
160
.PHONY : add-local-ip-to-cluster
150
161
add-local-ip-to-cluster : # # Add local IP to the GKE cluster master-authorized-networks
151
- ./ scripts/add-local-ip-auth-networks.sh
162
+ bash scripts/add-local-ip-auth-networks.sh
152
163
153
164
HELM_PARAMETERS += --set nameOverride=nginx-gateway --set nginxGateway.kind=skip --set service.create=false
154
165
@@ -159,7 +170,7 @@ deploy-updated-provisioner: ## Update provisioner manifest and deploy to the con
159
170
160
171
.PHONY : generate-static-deployment
161
172
generate-static-deployment :
162
- helm template nginx-gateway $(CHART_DIR ) --set nameOverride=nginx-gateway --set metrics.enable=false --set nginxGateway.productTelemetry.enable=false -n nginx-gateway -s templates/deployment.yaml --set nginxGateway.image.repository=$(PREFIX ) --set nginxGateway.image.tag=$(TAG ) --set nginxGateway.image.pullPolicy=Never --set nginx.image.repository=$(NGINX_PREFIX ) --set nginx.image.tag=$(TAG ) --set nginx.image.pullPolicy=Never --set nginxGateway.gwAPIExperimentalFeatures.enable=$(ENABLE_EXPERIMENTAL ) --set nginx.plus=$(PLUS_ENABLED ) > $(SELF_DIR ) config/tests/static-deployment.yaml
173
+ helm template nginx-gateway $(CHART_DIR ) $( HELM_TEMPLATE_COMMON_ARGS ) --set metrics.enable=false --set nginxGateway.productTelemetry.enable=false -n nginx-gateway -s templates/deployment.yaml --set nginxGateway.image.repository=$(PREFIX ) --set nginxGateway.image.tag=$(TAG ) --set nginxGateway.image.pullPolicy=Never --set nginx.image.repository=$(NGINX_PREFIX ) --set nginx.image.tag=$(TAG ) --set nginx.image.pullPolicy=Never --set nginxGateway.gwAPIExperimentalFeatures.enable=$(ENABLE_EXPERIMENTAL ) --set nginx.plus=$(PLUS_ENABLED ) > $(SELF_DIR ) config/tests/static-deployment.yaml
163
174
164
175
# this target is used to install the gateway-api CRDs from the main branch (only used in the nightly CI job)
165
176
# it overrides the target in the main Makefile when the GW_API_VERSION is set to main
0 commit comments