Skip to content

Files

Failed to load latest commit information.

Latest commit

 Cannot retrieve latest commit at this time.

History

History
 
 

conformance

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Prerequisites

Note: all commands in steps below are executed from the conformance directory

List available commands:

make
build-images                   Build NGF and nginx images
build-test-runner-image        Build conformance test runner image
cleanup-conformance-tests      Clean up conformance tests fixtures
create-kind-cluster            Create a kind cluster
delete-kind-cluster            Delete kind cluster
deploy-updated-provisioner     Update provisioner manifest and deploy to the configured kind cluster
help                           Display this help
install-ngf-edge               Install NGF with provisioner from edge on configured kind cluster
install-ngf-local-build        Install NGF from local build with provisioner on configured kind cluster
install-ngf-local-no-build     Install NGF from local build with provisioner on configured kind cluster but do not build the NGF image
load-images                    Load NGF and NGINX images on configured kind cluster
prepare-ngf-dependencies       Install NGF dependencies on configured kind cluster
reset-go-modules               Reset the go modules changes
run-conformance-tests          Run conformance tests
undo-manifests-update          Undo the changes in the manifest files
uninstall-ngf                  Uninstall NGF on configured kind cluster and undo manifest changes
update-go-modules              Update the gateway-api go modules to latest main version
update-ngf-manifest            Update the NGF deployment manifest image names and imagePullPolicies

Note: The following variables are configurable when running the below make commands:

Variable Default Description
CONFORMANCE_TAG latest The tag for the conformance test image
CONFORMANCE_PREFIX conformance-test-runner The prefix for the conformance test image
TAG edge The tag for the locally built NGF image
PREFIX nginx-gateway-fabric The prefix for the locally built NGF image
GW_API_VERSION 1.0.0 Tag for the Gateway API version to check out. Set to main to get the latest version
KIND_IMAGE Latest kind image, as defined in the tests/Dockerfile The kind image to use
KIND_KUBE_CONFIG ~/.kube/kind/config The location of the kubeconfig
GATEWAY_CLASS nginx The gateway class that should be used for the tests
SUPPORTED_FEATURES HTTPRoute,HTTPRouteQueryParamMatching, HTTPRouteMethodMatching,HTTPRoutePortRedirect, HTTPRouteSchemeRedirect The supported features that should be tested by the conformance tests. Ensure the list is comma separated with no spaces.
EXEMPT_FEATURES ReferenceGrant The features that should not be tested by the conformance tests
NGINX_IMAGE as defined in the provisioner/static-deployment.yaml file The NGINX image for the NGF deployments
NGF_MANIFEST ../deploy/manifests/nginx-gateway.yaml The location of the NGF manifest
SERVICE_MANIFEST ../deploy/manifests/service/nodeport.yaml The location of the NGF Service manifest
STATIC_MANIFEST provisioner/static-deployment.yaml The location of the NGF static deployment manifest
PROVISIONER_MANIFEST provisioner/provisioner.yaml The location of the NGF provisioner manifest
INSTALL_WEBHOOK false Install the Gateway API Validating Webhook. Necessary for Kubernetes versions < 1.25.

Step 1 - Create a kind Cluster

make create-kind-cluster

Note: The default kind cluster deployed is the latest available version. You can specify a different version by defining the kind image to use through the KIND_IMAGE variable, e.g.

make create-kind-cluster KIND_IMAGE=kindest/node:v1.27.3

Step 2 - Install NGINX Gateway Fabric to configured kind cluster

Note: If you want to run the latest conformance tests from the Gateway API main branch, set the following environment variable before deploying NGF:

 export GW_API_VERSION=main

Otherwise, the latest stable version will be used by default.

Option 1 Build and install NGINX Gateway Fabric from local to configured kind cluster

make install-ngf-local-build

Option 2 Install NGINX Gateway Fabric from local already built image to configured kind cluster

You can optionally skip the actual build step.

make install-ngf-local-no-build

Note: If choosing this option, the following step must be completed manually before you build the image:

make update-ngf-manifest PREFIX=<ngf_repo_name> TAG=<ngf_image_tag>

Option 3 Install NGINX Gateway Fabric from edge to configured kind cluster

You can also skip the build NGF image step and prepare the environment to instead use the edge image

make install-ngf-edge

Step 3 - Build conformance test runner image

Note: If you want to run the latest conformance tests from the Gateway API main branch, run the following make command to update the Go modules to main:

make update-go-modules

You can also point to a specific fork/branch by running:

go mod edit -replace=sigs.k8s.io/gateway-api=<your-fork>@<your-branch>
go mod download
go mod verify
go mod tidy

Otherwise, the latest stable version will be used by default.

make build-test-runner-image

Step 4 - Run Gateway conformance tests

make run-conformance-tests

Step 5 - Cleanup the conformance test fixtures and uninstall NGINX Gateway Fabric

make cleanup-conformance-tests
make uninstall-ngf

Step 6 - Revert changes to Go modules

Optional Not required if you aren't running the main Gateway API tests.

make reset-go-modules

Step 7 - Delete kind cluster

make delete-kind-cluster