diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index 99f8150110..7b1f5e4447 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -29,6 +29,7 @@ jobs: strategy: matrix: k8s-version: ["1.23.17", "latest"] + nginx-image: [nginx, nginx-plus] permissions: contents: write # needed for uploading release artifacts steps: @@ -63,7 +64,7 @@ jobs: uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 with: images: | - name=ghcr.io/nginxinc/nginx-gateway-fabric/nginx + name=ghcr.io/nginxinc/nginx-gateway-fabric/${{ matrix.nginx-image }} tags: | type=semver,pattern={{version}} type=edge @@ -74,7 +75,7 @@ jobs: run: | ngf_prefix=ghcr.io/nginxinc/nginx-gateway-fabric ngf_tag=${{ steps.ngf-meta.outputs.version }} - make update-ngf-manifest PREFIX=${ngf_prefix} TAG=${ngf_tag} + make update-ngf-manifest${{ matrix.nginx-image == 'nginx-plus' && '-with-plus' || ''}} PREFIX=${ngf_prefix} TAG=${ngf_tag} working-directory: ./conformance - name: Build binary @@ -98,16 +99,17 @@ jobs: - name: Build NGINX Docker Image uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0 with: - file: build/Dockerfile.nginx + file: build/Dockerfile${{ matrix.nginx-image == 'nginx' && '.nginx' || '' }}${{ matrix.nginx-image == 'nginx-plus' && '.nginxplus' || ''}} tags: ${{ steps.nginx-meta.outputs.tags }} context: "." load: true - cache-from: type=gha,scope=nginx - cache-to: type=gha,scope=nginx,mode=max + cache-from: type=gha,scope=${{ matrix.nginx-image }} + cache-to: type=gha,scope=${{ matrix.nginx-image }},mode=max pull: true build-args: | NJS_DIR=internal/mode/static/nginx/modules/src NGINX_CONF_DIR=internal/mode/static/nginx/conf + BUILD_AGENT=gha - name: Update Go Modules if: ${{ github.event_name == 'schedule' }} @@ -146,7 +148,7 @@ jobs: ngf_tag=${{ steps.ngf-meta.outputs.version }} if [ ${{ github.event_name }} == "schedule" ]; then export GW_API_VERSION=main; fi if [ ${{ startsWith(matrix.k8s-version, '1.23') || startsWith(matrix.k8s-version, '1.24') }} == "true" ]; then export INSTALL_WEBHOOK=true; fi - make install-ngf-local-no-build PREFIX=${ngf_prefix} TAG=${ngf_tag} + make install-ngf-local-no-build${{ matrix.nginx-image == 'nginx-plus' && '-with-plus' || ''}} PREFIX=${ngf_prefix} TAG=${ngf_tag} working-directory: ./conformance - name: Run conformance tests diff --git a/conformance/Makefile b/conformance/Makefile index c9000e9891..795348b914 100644 --- a/conformance/Makefile +++ b/conformance/Makefile @@ -2,6 +2,7 @@ TAG = edge VERSION = 1.1.0 # NGF version PREFIX = nginx-gateway-fabric NGINX_PREFIX = $(PREFIX)/nginx +NGINX_PLUS_PREFIX ?= $(PREFIX)/nginx-plus GW_API_VERSION ?= 1.0.0 GATEWAY_CLASS = nginx SUPPORTED_FEATURES = HTTPRouteQueryParamMatching,HTTPRouteMethodMatching,HTTPRoutePortRedirect,HTTPRouteSchemeRedirect,HTTPRouteHostRewrite,HTTPRoutePathRewrite,GatewayPort8080 @@ -13,7 +14,6 @@ NGF_MANIFEST=../deploy/manifests/nginx-gateway.yaml CRDS=../deploy/manifests/crds/ STATIC_MANIFEST=provisioner/static-deployment.yaml PROVISIONER_MANIFEST=provisioner/provisioner.yaml -NGINX_IMAGE=$(shell yq '.spec.template.spec.containers[1].image as $$nginx_ver | $$nginx_ver' $(STATIC_MANIFEST)) INSTALL_WEBHOOK ?= false .DEFAULT_GOAL := help @@ -39,20 +39,38 @@ create-kind-cluster: ## Create a kind cluster update-ngf-manifest: ## Update the NGF deployment manifest image names and imagePullPolicies 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 - +.PHONY: update-ngf-manifest-with-plus +update-ngf-manifest-with-plus: ## Update the NGF deployment manifest image names and imagePullPolicies including nginx-plus + 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_PLUS_PREFIX) --set nginx.image.tag=$(TAG) --set nginx.image.pullPolicy=Never --set nginx.plus=true" && cd - + .PHONY: build-images -build-images: ## Build NGF and nginx images +build-images: ## Build NGF and NGINX images cd .. && make PREFIX=$(PREFIX) TAG=$(TAG) build-images .PHONY: load-images load-images: ## Load NGF and NGINX images on configured kind cluster cd .. && make PREFIX=$(PREFIX) TAG=$(TAG) load-images +.PHONY: build-images-with-plus +build-images-with-plus: ## Build NGF and NGINX Plus images + cd .. && make PREFIX=$(PREFIX) TAG=$(TAG) build-images-with-plus + +.PHONY: load-images-with-plus +load-images-with-plus: ## Load NGF and NGINX Plus images on configured kind cluster + cd .. && make PREFIX=$(PREFIX) TAG=$(TAG) load-images-with-plus + .PHONY: prepare-ngf-dependencies prepare-ngf-dependencies: update-ngf-manifest ## Install NGF dependencies on configured kind cluster ./scripts/install-gateway.sh $(GW_API_VERSION) $(INSTALL_WEBHOOK) kubectl apply -f $(CRDS) kubectl apply -f $(NGF_MANIFEST) +.PHONY: prepare-ngf-dependencies-with-plus +prepare-ngf-dependencies-with-plus: update-ngf-manifest-with-plus ## Install NGF dependencies with Plus on configured kind cluster + ./scripts/install-gateway.sh $(GW_API_VERSION) $(INSTALL_WEBHOOK) + kubectl apply -f $(CRDS) + kubectl apply -f $(NGF_MANIFEST) + .PHONY: deploy-updated-provisioner deploy-updated-provisioner: ## Update provisioner manifest and deploy to the configured kind cluster yq '(select(di != 3))' $(PROVISIONER_MANIFEST) | kubectl apply -f - @@ -64,6 +82,12 @@ install-ngf-local-build: prepare-ngf-dependencies build-images load-images deplo .PHONY: install-ngf-local-no-build install-ngf-local-no-build: prepare-ngf-dependencies load-images deploy-updated-provisioner ## Install NGF from local build with provisioner on configured kind cluster but do not build the NGF image +.PHONY: install-ngf-local-build-with-plus +install-ngf-local-build-with-plus: prepare-ngf-dependencies-with-plus build-images-with-plus load-images-with-plus deploy-updated-provisioner ## Install NGF with Plus from local build with provisioner on configured kind cluster + +.PHONY: install-ngf-local-no-build-with-plus +install-ngf-local-no-build-with-plus: prepare-ngf-dependencies-with-plus load-images-with-plus deploy-updated-provisioner ## Install NGF with Plus from local build with provisioner on configured kind cluster but do not build the NGF image + .PHONY: install-ngf-edge install-ngf-edge: prepare-ngf-dependencies ## Install NGF with provisioner from edge on configured kind cluster kubectl apply -f $(PROVISIONER_MANIFEST) diff --git a/conformance/README.md b/conformance/README.md index 52c97d86f5..aba66e6933 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -16,24 +16,30 @@ make ``` ```text -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 +build-images-with-plus Build NGF and NGINX Plus images +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-with-plus Install NGF with Plus from local build with provisioner on configured kind cluster +install-ngf-local-build Install NGF from local build with provisioner on configured kind cluster +install-ngf-local-no-build-with-plus Install NGF with Plus from local build with provisioner on configured kind cluster but do not build the NGF image +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-with-plus Load NGF and NGINX Plus images on configured kind cluster +load-images Load NGF and NGINX images on configured kind cluster +prepare-ngf-dependencies-with-plus Install NGF dependencies with Plus 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-with-plus Update the NGF deployment manifest image names and imagePullPolicies including nginx-plus +update-ngf-manifest Update the NGF deployment manifest image names and imagePullPolicies ``` **Note:** The following variables are configurable when running the below `make` commands: @@ -50,7 +56,6 @@ update-ngf-manifest Update the NGF deployment manifest image names an | 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 | @@ -87,6 +92,12 @@ make create-kind-cluster KIND_IMAGE=kindest/node:v1.27.3 make install-ngf-local-build ``` +Or, to install NGF with NGINX Plus enabled (NGINX Plus cert and key must exist in the root of the repo): + +```makefile +make install-ngf-local-build-with-plus +``` + #### *Option 2* Install NGINX Gateway Fabric from local already built image to configured kind cluster You can optionally skip the actual *build* step. @@ -95,15 +106,28 @@ You can optionally skip the actual *build* step. make install-ngf-local-no-build ``` +Or, to install NGF with NGINX Plus enabled: + +```makefile +make install-ngf-no-build-with-plus +``` + > Note: If choosing this option, the following step *must* be completed manually *before* you build the image: ```makefile make update-ngf-manifest PREFIX= TAG= ``` +Or, if you are building the NGINX Plus image: + +```makefile +make update-ngf-manifest-with-plus PREFIX= 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 +You can also skip the build NGF image step and prepare the environment to instead use the `edge` image. Note that this +option does not currently support installing with NGINX Plus enabled. ```makefile make install-ngf-edge diff --git a/tests/Makefile b/tests/Makefile index fd14f5ec0f..031e51f99f 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,6 +1,8 @@ TAG = edge PREFIX = nginx-gateway-fabric NGINX_PREFIX = $(PREFIX)/nginx +NGINX_PLUS_PREFIX = $(PREFIX)/nginx-plus +PLUS_ENABLED=false PULL_POLICY=Never GW_API_PREV_VERSION ?= 1.0.0 ## Supported Gateway API version from previous NGF release GW_API_VERSION ?= 1.0.0 ## Supported Gateway API version for NGF under test @@ -14,6 +16,12 @@ ifneq ($(GINKGO_LABEL),) override GINKGO_FLAGS += -ginkgo.label-filter "$(GINKGO_LABEL)" endif +# Check if PLUS_ENABLED is true +ifeq ($(PLUS_ENABLED),true) + # If true, set NGINX_PREFIX to $NGINX_PLUS_PREFIX + NGINX_PREFIX := $(NGINX_PLUS_PREFIX) +endif + .PHONY: help help: Makefile ## Display this help @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "; printf "Usage:\n\n make \033[36m\033[0m\n\nTargets:\n\n"}; {printf " \033[36m%-30s\033[0m %s\n", $$1, $$2}' @@ -26,13 +34,21 @@ create-kind-cluster: ## Create a kind cluster build-images: ## Build NGF and NGINX images cd .. && make PREFIX=$(PREFIX) TAG=$(TAG) build-images +.PHONY: build-images-with-plus +build-images-with-plus: ## Build NGF and NGINX Plus images + cd .. && make PREFIX=$(PREFIX) TAG=$(TAG) build-images-with-plus + .PHONY: load-images load-images: ## Load NGF and NGINX images on configured kind cluster - kind load docker-image $(PREFIX):$(TAG) $(NGINX_PREFIX):$(TAG) + cd .. && make PREFIX=$(PREFIX) TAG=$(TAG) load-images + +.PHONY: load-images-with-plus +load-images-with-plus: ## Load NGF and NGINX Plus images on configured kind cluster + cd .. && make PREFIX=$(PREFIX) TAG=$(TAG) load-images-with-plus test: ## Run the system tests against your default k8s cluster go test -v ./suite $(GINKGO_FLAGS) -args --gateway-api-version=$(GW_API_VERSION) \ - --gateway-api-prev-version=$(GW_API_PREV_VERSION) --image-tag=$(TAG) \ + --gateway-api-prev-version=$(GW_API_PREV_VERSION) --image-tag=$(TAG) --plus-enabled=$(PLUS_ENABLED) \ --ngf-image-repo=$(PREFIX) --nginx-image-repo=$(NGINX_PREFIX) --pull-policy=$(PULL_POLICY) \ --k8s-version=$(K8S_VERSION) --service-type=$(GW_SERVICE_TYPE) --is-gke-internal-lb=$(GW_SVC_GKE_INTERNAL) diff --git a/tests/README.md b/tests/README.md index 5a2c4514a9..b5d01b10c2 100644 --- a/tests/README.md +++ b/tests/README.md @@ -54,18 +54,20 @@ test Run the system tests against your default k8s clu **Note:** The following variables are configurable when running the below `make` commands: -| Variable | Default | Description | -| ------------------- | -------------------------- | -------------------------------------------------------------- | -| TAG | edge | tag for the locally built NGF images | -| PREFIX | nginx-gateway-fabric | prefix for the locally built NGF image | -| NGINX_PREFIX | nginx-gateway-fabric/nginx | prefix for the locally built NGINX image | -| PULL_POLICY | Never | NGF image pull policy | -| GW_API_VERSION | 1.0.0 | version of Gateway API resources to install | -| K8S_VERSION | latest | version of k8s that the tests are run on | -| GW_SERVICE_TYPE | NodePort | type of Service that should be created | -| GW_SVC_GKE_INTERNAL | false | specifies if the LoadBalancer should be a GKE internal service | -| GINKGO_LABEL | "" | name of the ginkgo label that will filter the tests to run | -| GINKGO_FLAGS | "" | other ginkgo flags to pass to the go test command | +| Variable | Default | Description | +| ------------------- | ------------------------------- | -------------------------------------------------------------- | +| TAG | edge | tag for the locally built NGF images | +| PREFIX | nginx-gateway-fabric | prefix for the locally built NGF image | +| NGINX_PREFIX | nginx-gateway-fabric/nginx | prefix for the locally built NGINX image | +| NGINX_PLUS_PREFIX | nginx-gateway-fabric/nginx-plus | prefix for the locally built NGINX Plus image | +| PLUS_ENABLED | false | Flag to indicate if NGINX Plus should be enabled | +| PULL_POLICY | Never | NGF image pull policy | +| GW_API_VERSION | 1.0.0 | version of Gateway API resources to install | +| K8S_VERSION | latest | version of k8s that the tests are run on | +| GW_SERVICE_TYPE | NodePort | type of Service that should be created | +| GW_SVC_GKE_INTERNAL | false | specifies if the LoadBalancer should be a GKE internal service | +| GINKGO_LABEL | "" | name of the ginkgo label that will filter the tests to run | +| GINKGO_FLAGS | "" | other ginkgo flags to pass to the go test command | ## Step 1 - Create a Kubernetes cluster @@ -91,6 +93,12 @@ your images to a registry that is accessible from that cloud provider. make build-images load-images TAG=$(whoami) ``` +Or, to build NGF with NGINX Plus enabled (NGINX Plus cert and key must exist in the root of the repo): + +```makefile +make build-images-with-plus load-images-with-plus TAG=$(whoami) +``` + ## Step 3 - Run the tests ### 3a - Run the tests locally @@ -99,6 +107,12 @@ make build-images load-images TAG=$(whoami) make test TAG=$(whoami) ``` +Or, to run the tests with NGINX Plus enabled: + +```makefile +make test TAG=$(whoami) PLUS_ENABLED=true +``` + ### 3b - Run the tests on a GKE cluster from a GCP VM This step only applies if you would like to run the tests from a GCP based VM. diff --git a/tests/framework/ngf.go b/tests/framework/ngf.go index 0f3162835e..5e27dd58ca 100644 --- a/tests/framework/ngf.go +++ b/tests/framework/ngf.go @@ -31,6 +31,7 @@ type InstallationConfig struct { ImagePullPolicy string ServiceType string IsGKEInternalLB bool + Plus bool } // InstallGatewayAPI installs the specified version of the Gateway API resources. @@ -190,6 +191,9 @@ func setImageArgs(cfg InstallationConfig) []string { if cfg.ImagePullPolicy != "" { args = append(args, formatValueSet("nginx.image.pullPolicy", cfg.ImagePullPolicy)...) } + if cfg.Plus { + args = append(args, formatValueSet("nginx.plus", "true")...) + } } if cfg.ServiceType != "" { diff --git a/tests/framework/results.go b/tests/framework/results.go index 78d4dad254..5ea944563b 100644 --- a/tests/framework/results.go +++ b/tests/framework/results.go @@ -33,15 +33,15 @@ func CreateResultsFile(filename string) (*os.File, error) { } // WriteSystemInfoToFile writes the cluster system info to the given file. -func WriteSystemInfoToFile(file *os.File, ci ClusterInfo) error { +func WriteSystemInfoToFile(file *os.File, ci ClusterInfo, plus bool) error { clusterType := "Local" if ci.IsGKE { clusterType = "GKE" } text := fmt.Sprintf( //nolint:lll - "# Results\n\n## Test environment\n\n%s Cluster:\n\n- Node count: %d\n- k8s version: %s\n- vCPUs per node: %d\n- RAM per node: %s\n- Max pods per node: %d\n", - clusterType, ci.NodeCount, ci.K8sVersion, ci.CPUCountPerNode, ci.MemoryPerNode, ci.MaxPodsPerNode, + "# Results\n\n## Test environment\n\nNGINX Plus: %v\n\n%s Cluster:\n\n- Node count: %d\n- k8s version: %s\n- vCPUs per node: %d\n- RAM per node: %s\n- Max pods per node: %d\n", + plus, clusterType, ci.NodeCount, ci.K8sVersion, ci.CPUCountPerNode, ci.MemoryPerNode, ci.MaxPodsPerNode, ) if _, err := fmt.Fprint(file, text); err != nil { return err diff --git a/tests/scripts/remote-scripts/run-tests.sh b/tests/scripts/remote-scripts/run-tests.sh index 3f1a1627d7..3bd3e47fbf 100644 --- a/tests/scripts/remote-scripts/run-tests.sh +++ b/tests/scripts/remote-scripts/run-tests.sh @@ -6,4 +6,4 @@ source ~/vars.env echo "export PATH=$PATH:/usr/local/go/bin" >> $HOME/.profile && . $HOME/.profile -cd nginx-gateway-fabric/tests && make test TAG=${TAG} PREFIX=${PREFIX} NGINX_PREFIX=${NGINX_PREFIX} GINKGO_LABEL=${GINKGO_LABEL} GINKGO_FLAGS=${GINKGO_FLAGS} PULL_POLICY=Always GW_SERVICE_TYPE=LoadBalancer GW_SVC_GKE_INTERNAL=true +cd nginx-gateway-fabric/tests && make test TAG=${TAG} PREFIX=${PREFIX} NGINX_PREFIX=${NGINX_PREFIX} NGINX_PLUS_PREFIX=${NGINX_PLUS_PREFIX} PLUS_ENABLED=${PLUS_ENABLED} GINKGO_LABEL=${GINKGO_LABEL} GINKGO_FLAGS=${GINKGO_FLAGS} PULL_POLICY=Always GW_SERVICE_TYPE=LoadBalancer GW_SVC_GKE_INTERNAL=true diff --git a/tests/scripts/vars.env-example b/tests/scripts/vars.env-example index 6801e34ee6..16cd2091ac 100644 --- a/tests/scripts/vars.env-example +++ b/tests/scripts/vars.env-example @@ -3,6 +3,7 @@ RESOURCE_NAME= PREFIX= NGINX_PREFIX= +NGINX_PLUS_PREFIX= GKE_CLUSTER_NAME= GKE_CLUSTER_ZONE= GKE_CLUSTER_REGION= @@ -16,3 +17,4 @@ GINKGO_LABEL= GINKGO_FLAGS= SOURCE_IP_RANGE= ADD_VM_IP_AUTH_NETWORKS= +PLUS_ENABLED= diff --git a/tests/suite/dataplane_perf_test.go b/tests/suite/dataplane_perf_test.go index a3f5e6514f..09f7a67482 100644 --- a/tests/suite/dataplane_perf_test.go +++ b/tests/suite/dataplane_perf_test.go @@ -72,7 +72,7 @@ var _ = Describe("Dataplane performance", Ordered, Label("performance"), func() filename := filepath.Join(resultsDir, fmt.Sprintf("%s.md", version)) outFile, err = framework.CreateResultsFile(filename) Expect(err).ToNot(HaveOccurred()) - Expect(framework.WriteSystemInfoToFile(outFile, clusterInfo)).To(Succeed()) + Expect(framework.WriteSystemInfoToFile(outFile, clusterInfo, *plusEnabled)).To(Succeed()) }) AfterAll(func() { diff --git a/tests/suite/system_suite_test.go b/tests/suite/system_suite_test.go index d21a330285..1a3e157187 100644 --- a/tests/suite/system_suite_test.go +++ b/tests/suite/system_suite_test.go @@ -52,6 +52,7 @@ var ( imagePullPolicy = flag.String("pull-policy", "", "Image pull policy for NGF images") serviceType = flag.String("service-type", "NodePort", "Type of service fronting NGF to be deployed") isGKEInternalLB = flag.Bool("is-gke-internal-lb", false, "Is the LB service GKE internal only") + plusEnabled = flag.Bool("plus-enabled", false, "Is NGINX Plus enabled") ) var ( @@ -118,6 +119,7 @@ func setup(cfg setupConfig, extraInstallArgs ...string) { ChartPath: cfg.chartPath, ServiceType: *serviceType, IsGKEInternalLB: *isGKEInternalLB, + Plus: *plusEnabled, } // if we aren't installing from the public charts, then set the custom images diff --git a/tests/suite/upgrade_test.go b/tests/suite/upgrade_test.go index 41b239f642..da0ce66090 100644 --- a/tests/suite/upgrade_test.go +++ b/tests/suite/upgrade_test.go @@ -80,7 +80,7 @@ var _ = Describe("Upgrade testing", Label("upgrade"), func() { filename := filepath.Join(resultsDir, fmt.Sprintf("%s.md", version)) resultsFile, err = framework.CreateResultsFile(filename) Expect(err).ToNot(HaveOccurred()) - Expect(framework.WriteSystemInfoToFile(resultsFile, clusterInfo)).To(Succeed()) + Expect(framework.WriteSystemInfoToFile(resultsFile, clusterInfo, *plusEnabled)).To(Succeed()) }) AfterEach(func() {