1
- NGF_TAG = edge
2
- NGF_PREFIX = nginx-gateway-fabric
3
- NGINX_IMAGE_NAME = $(NGF_PREFIX ) /nginx
1
+ TAG = edge
2
+ PREFIX = nginx-gateway-fabric
3
+ NGINX_PREFIX = $(PREFIX ) /nginx
4
4
GW_API_VERSION ?= 1.0.0
5
5
GATEWAY_CLASS = nginx
6
6
SUPPORTED_FEATURES = HTTPRoute,HTTPRouteQueryParamMatching,HTTPRouteMethodMatching,HTTPRoutePortRedirect,HTTPRouteSchemeRedirect,GatewayClassObservedGenerationBump
7
7
KIND_IMAGE ?= $(shell grep -m1 'FROM kindest/node' <tests/Dockerfile | awk -F'[ ]' '{print $$2}')
8
8
KIND_KUBE_CONFIG =$${HOME}/.kube/kind/config
9
- TAG = latest
10
- PREFIX = conformance-test-runner
9
+ CONFORMANCE_TAG = latest
10
+ CONFORMANCE_PREFIX = conformance-test-runner
11
11
NGF_MANIFEST =../deploy/manifests/nginx-gateway.yaml
12
12
CRDS =../deploy/manifests/crds/
13
13
STATIC_MANIFEST =provisioner/static-deployment.yaml
@@ -27,7 +27,7 @@ update-go-modules: ## Update the gateway-api go modules to latest main version
27
27
28
28
.PHONY : build-test-runner-image
29
29
build-test-runner-image : # # Build conformance test runner image
30
- docker build -t $(PREFIX ) :$(TAG ) -f tests/Dockerfile ..
30
+ docker build -t $(CONFORMANCE_PREFIX ) :$(CONFORMANCE_TAG ) -f tests/Dockerfile ..
31
31
32
32
.PHONY : create-kind-cluster
33
33
create-kind-cluster : # # Create a kind cluster
@@ -36,15 +36,15 @@ create-kind-cluster: ## Create a kind cluster
36
36
37
37
.PHONY : update-ngf-manifest
38
38
update-ngf-manifest : # # Update the NGF deployment manifest image names and imagePullPolicies
39
- cd .. && make generate-manifests HELM_TEMPLATE_EXTRA_ARGS_FOR_ALL_MANIFESTS_FILE=" --set nginxGateway.kind=skip" HELM_TEMPLATE_COMMON_ARGS=" --set nginxGateway.image.repository=$( NGF_PREFIX ) --set nginxGateway.image.tag=$( NGF_TAG ) --set nginxGateway.image.pullPolicy=Never --set nginx.image.repository=$( NGINX_IMAGE_NAME ) --set nginx.image.tag=$( NGF_TAG ) --set nginx.image.pullPolicy=Never" && cd -
39
+ cd .. && make generate-manifests HELM_TEMPLATE_EXTRA_ARGS_FOR_ALL_MANIFESTS_FILE=" --set nginxGateway.kind=skip" HELM_TEMPLATE_COMMON_ARGS=" --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" && cd -
40
40
41
41
.PHONY : build-images
42
42
build-images : # # Build NGF and nginx images
43
- cd .. && make PREFIX=$(NGF_PREFIX ) TAG=$(NGF_TAG ) build-images
43
+ cd .. && make PREFIX=$(PREFIX ) TAG=$(TAG ) build-images
44
44
45
45
.PHONY : load-images
46
46
load-images : # # Load NGF and NGINX images on configured kind cluster
47
- kind load docker-image $(NGF_PREFIX ) :$(NGF_TAG ) $(NGINX_IMAGE_NAME ) :$(NGF_TAG )
47
+ kind load docker-image $(PREFIX ) :$(TAG ) $(NGINX_PREFIX ) :$(TAG )
48
48
49
49
.PHONY : prepare-ngf-dependencies
50
50
prepare-ngf-dependencies : update-ngf-manifest # # Install NGF dependencies on configured kind cluster
@@ -55,7 +55,7 @@ prepare-ngf-dependencies: update-ngf-manifest ## Install NGF dependencies on con
55
55
.PHONY : deploy-updated-provisioner
56
56
deploy-updated-provisioner : # # Update provisioner manifest and deploy to the configured kind cluster
57
57
yq ' (select(di != 3))' $(PROVISIONER_MANIFEST ) | kubectl apply -f -
58
- yq ' (select(.spec.template.spec.containers[].image) | .spec.template.spec.containers[].image="$(NGF_PREFIX ):$(NGF_TAG )" | .spec.template.spec.containers[].imagePullPolicy = "Never")' $(PROVISIONER_MANIFEST ) | kubectl apply -f -
58
+ yq ' (select(.spec.template.spec.containers[].image) | .spec.template.spec.containers[].image="$(PREFIX ):$(TAG )" | .spec.template.spec.containers[].imagePullPolicy = "Never")' $(PROVISIONER_MANIFEST ) | kubectl apply -f -
59
59
60
60
.PHONY : install-ngf-local-build
61
61
install-ngf-local-build : prepare-ngf-dependencies build-images load-images deploy-updated-provisioner # # Install NGF from local build with provisioner on configured kind cluster
@@ -69,10 +69,10 @@ install-ngf-edge: prepare-ngf-dependencies ## Install NGF with provisioner from
69
69
70
70
.PHONY : run-conformance-tests
71
71
run-conformance-tests : # # Run conformance tests
72
- kind load docker-image $(PREFIX ) :$(TAG )
72
+ kind load docker-image $(CONFORMANCE_PREFIX ) :$(CONFORMANCE_TAG )
73
73
kubectl apply -f tests/conformance-rbac.yaml
74
74
kubectl run -i conformance \
75
- --image=$(PREFIX ) :$(TAG ) --image-pull-policy=Never \
75
+ --image=$(CONFORMANCE_PREFIX ) :$(CONFORMANCE_TAG ) --image-pull-policy=Never \
76
76
--overrides=' { "spec": { "serviceAccountName": "conformance" } }' \
77
77
--restart=Never -- sh -c " go test -v . -tags conformance,experimental -args --gateway-class=$( GATEWAY_CLASS) \
78
78
--supported-features=$(SUPPORTED_FEATURES ) --version=$(VERSION ) \
0 commit comments