@@ -64,27 +64,9 @@ vet: ## Run go vet against code.
6464test : manifests generate fmt vet envtest # # Run tests.
6565 KUBEBUILDER_ASSETS=" $( shell $( ENVTEST) use $( ENVTEST_K8S_VERSION) --bin-dir $( LOCALBIN) -p path) " go test $$(go list ./... | grep -v /e2e ) -coverprofile cover.out
6666
67- # TODO(user): To use a different vendor for e2e tests, modify the setup under 'tests/e2e'.
68- # The default setup assumes Kind is pre-installed and builds/loads the Manager Docker image locally.
69- # Prometheus and CertManager are installed by default; skip with:
70- # - PROMETHEUS_INSTALL_SKIP=true
71- # - CERT_MANAGER_INSTALL_SKIP=true
72- .PHONY : test-e2e
73- test-e2e : chainsaw
74- @command -v kind > /dev/null 2>&1 || { \
75- echo " Kind is not installed. Please install Kind manually." ; \
76- exit 1; \
77- }
78- @kind get clusters | grep -q ' nso-standard' || { \
79- echo " No Kind cluster is running. Please start a Kind cluster before running the e2e tests." ; \
80- exit 1; \
81- }
82- $(KIND ) get kubeconfig --name nso-standard > $(TMPDIR ) /.kind-nso-standard.yaml
83- $(KIND ) get kubeconfig --name nso-infra > $(TMPDIR ) /.kind-nso-infra.yaml
84- $(CHAINSAW ) test $(or $(TEST_DIR ) ,./test/e2e) \
85- --parallel 1 \
86- --cluster nso-standard=$(TMPDIR ) /.kind-nso-standard.yaml \
87- --cluster nso-infra=$(TMPDIR ) /.kind-nso-infra.yaml
67+ # The e2e suite runs against the two-cluster prod-fidelity env; bring it up and
68+ # run it with `task test-infra:up` then `task test-infra:test-e2e`
69+ # (Taskfile.test-infra.yml).
8870
8971GATEWAY_CONFORMANCE_CLASS ?= gateway-conformance
9072GATEWAY_CONFORMANCE_FLAGS ?=
@@ -153,76 +135,14 @@ build-installer: set-image-controller generate ## Generate a consolidated YAML w
153135set-image-controller : manifests kustomize
154136 cd config/manager && $(KUSTOMIZE ) edit set image ghcr.io/datum-cloud/network-services-operator=${IMG}
155137
156- .PHONY : prepare-infra-cluster
157- prepare-infra-cluster : cert-manager envoy-gateway external-dns downstream-crds downstream-waf-dataplane billing-usage-collector load-image-infra extension-server configure-eg-extension-manager
158-
159- .PHONY : downstream-crds
160- downstream-crds : # # Install NSO CRDs on the downstream (infra) cluster that the replicator mirrors into it.
161- $(KUBECTL ) apply -f config/crd/bases/networking.datumapis.com_connectors.yaml
162- $(KUBECTL ) apply -f config/crd/bases/networking.datumapis.com_httpproxies.yaml
163- $(KUBECTL ) apply -f config/crd/bases/networking.datumapis.com_trafficprotectionpolicies.yaml
164-
165- .PHONY : downstream-waf-dataplane
166- downstream-waf-dataplane : kustomize load-image-infra # # Install the Coraza WAF data plane (downstream EG instance + extension server + datum-downstream-gateway GatewayClass) on the infra cluster.
167- $(KUSTOMIZE ) build --enable-helm config/tools/envoy-gateway-downstream | kubectl apply --server-side=true --force-conflicts -f -
168- $(KUSTOMIZE ) build config/e2e-downstream | kubectl apply --server-side=true --force-conflicts -f -
169-
170- .PHONY : prepare-e2e
171- prepare-e2e : chainsaw set-image-controller cert-manager load-image-all deploy-e2e
172-
173138.PHONY : prepare-dev
174139prepare-dev : chainsaw set-image-controller cert-manager install
175140
176- .PHONY : load-image-all
177- load-image-all : load-image-operator load-image-infra
178-
179- .PHONY : load-image-operator
180- load-image-operator : docker-build kind
181- $(KIND ) load docker-image $(IMG ) -n nso-standard
182-
183- .PHONY : load-image-infra
184- load-image-infra : docker-build kind # # Load operator image into nso-infra kind cluster (needed by the extension server).
185- $(KIND ) load docker-image $(IMG ) -n nso-infra
186-
187141.PHONY : cert-manager
188142cert-manager : cmctl
189143 $(KUSTOMIZE ) build --enable-helm config/tools/cert-manager | kubectl apply --server-side=true --force-conflicts -f -
190144 $(CMCTL ) check api --wait=5m
191145
192- .PHONY : envoy-gateway
193- envoy-gateway :
194- $(KUSTOMIZE ) build --enable-helm config/tools/envoy-gateway | kubectl apply --server-side=true --force-conflicts -f -
195-
196- .PHONY : external-dns
197- external-dns :
198- $(KUSTOMIZE ) build --enable-helm config/tools/external-dns | kubectl apply --server-side=true --force-conflicts -f -
199-
200- .PHONY : billing-usage-collector
201- billing-usage-collector :
202- $(KUSTOMIZE ) build --enable-helm config/tools/billing-usage-collector | kubectl apply --server-side=true --force-conflicts -f -
203-
204- .PHONY : extension-server
205- extension-server : # # Deploy the NSO extension server to the infra cluster (e2e overlay with cert-manager-issued TLS).
206- $(KUSTOMIZE ) build --enable-helm config/extension-server-e2e | kubectl apply --server-side=true --force-conflicts -f -
207- kubectl rollout restart deployment/network-services-operator-envoy-gateway-extension-server \
208- -n network-services-operator-system
209- kubectl rollout status deployment/network-services-operator-envoy-gateway-extension-server \
210- -n network-services-operator-system --timeout=5m
211-
212- .PHONY : configure-eg-extension-manager
213- configure-eg-extension-manager : # # Patch the EG ConfigMap to enable extensionManager and restart the EG controller.
214- $(KUSTOMIZE ) build --enable-helm config/tools/envoy-gateway/overlays/e2e | kubectl apply --server-side=true --force-conflicts -f -
215- kubectl rollout restart deployment/envoy-gateway -n envoy-gateway-system
216- kubectl rollout status deployment/envoy-gateway -n envoy-gateway-system --timeout=3m
217-
218- .PHONY : kind-standard-cluster
219- kind-standard-cluster : kind
220- $(KIND ) create cluster --config=config/tools/kind/standard-cluster.yaml
221-
222- .PHONY : kind-infra-cluster
223- kind-infra-cluster : kind
224- $(KIND ) create cluster --config=config/tools/kind/infra-cluster.yaml
225-
226146# #@ Deployment
227147
228148ifndef ignore-not-found
@@ -241,9 +161,6 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified
241161deploy : set-image-controller # # Deploy controller to the K8s cluster specified in ~/.kube/config.
242162 $(KUSTOMIZE ) build config/default | $(KUBECTL ) apply -f -
243163
244- .PHONY : deploy-e2e
245- deploy-e2e : set-image-controller
246- $(KUSTOMIZE ) build config/e2e | $(KUBECTL ) apply -f -
247164
248165.PHONY : undeploy
249166undeploy : kustomize # # Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
@@ -284,7 +201,7 @@ CERTMANAGER_VERSION ?= 1.17.1
284201CRDOC_VERSION ?= v0.6.4
285202
286203# renovate: datasource=go depName=sigs.k8s.io/kind
287- KIND_VERSION ?= v0.27 .0
204+ KIND_VERSION ?= v0.32 .0
288205
289206# renovate: datasource=go depName=github.com/kyverno/chainsaw
290207CHAINSAW_VERSION ?= v0.2.15
0 commit comments