Add check-envtest-existing make target
This change adds a new target to the Makefile that will run our envtest test
suite against a live cluster. This is enabling a feature of envtest that uses
your local kubeconfig to access the live cluster.
@@ -225,6 +225,10 @@ check:
check-envtest: hack/tools/envtest
KUBEBUILDER_ASSETS="$(CURDIR)/$^/bin" $(GO) test -count=1 -cover -tags=envtest ./internal/controller/... ./internal/pgbackrest/...
+.PHONY: check-envtest-existing
+check-envtest-existing:
+ USE_EXISTING_CLUSTER=true $(GO) test -count=1 -tags=envtest ./internal/controller/... ./internal/pgbackrest/...
+
.PHONY: check-generate
check-generate: generate-crd generate-deepcopy
git diff --exit-code -- config/crd
