-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test utilities for installing NGF (#1256)
Problem: 1. In order to start running system tests, we need a framework in place. 2. Sometimes when installed, NGF would start before the control plane CRD existed. Solution: 1. Implement a basic framework that installs and uninstalls NGF. 2. Add a polling loop to find the control plane CRD before exiting. --------- Co-authored-by: bjee19 <[email protected]>
- Loading branch information
Showing
11 changed files
with
360 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
TAG = edge | ||
PREFIX = nginx-gateway-fabric | ||
NGINX_PREFIX = $(PREFIX)/nginx | ||
PULL_POLICY=Never | ||
GW_API_VERSION ?= 1.0.0 | ||
K8S_VERSION ?= latest ## Expected format: 1.24 (major.minor) or latest | ||
|
||
.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<target>\033[0m\n\nTargets:\n\n"}; {printf " \033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
.PHONY: create-kind-cluster | ||
create-kind-cluster: ## Create a kind cluster | ||
cd .. && make create-kind-cluster | ||
|
||
.PHONY: build-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 | ||
kind load docker-image $(PREFIX):$(TAG) $(NGINX_PREFIX):$(TAG) | ||
|
||
test: ## Run the system tests against your default k8s cluster | ||
go test -v . -args --gateway-api-version=$(GW_API_VERSION) --image-tag=$(TAG) \ | ||
--ngf-image-repo=$(PREFIX) --nginx-image-repo=$(NGINX_PREFIX) --pull-policy=$(PULL_POLICY) \ | ||
--k8s-version=$(K8S_VERSION) | ||
|
||
.PHONY: delete-kind-cluster | ||
delete-kind-cluster: ## Delete kind cluster | ||
kind delete cluster |
Oops, something went wrong.