Skip to content

Commit 089aa45

Browse files
authored
Add standard-e2e manifest (#2056)
This renames two overlays: * cert-manager -> standard * e2e -> standard-e2e This also adds a new manifest: * manifests/standard-e2e.yaml This fixes the issue with the current test-e2e modifying the standard manifest with e2e parameters, leaving a dirty workspace. This changes the manifest used by the e2e test to be it's own standard-e2e manifest. This is part of the feature-gated API functionality. Signed-off-by: Todd Short <tshort@redhat.com>
1 parent ab24788 commit 089aa45

File tree

4 files changed

+1985
-5
lines changed

4 files changed

+1985
-5
lines changed

Makefile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ else
7171
$(warning Could not find docker or podman in path! This may result in targets requiring a container runtime failing!)
7272
endif
7373

74-
KUSTOMIZE_BUILD_DIR := config/overlays/cert-manager
74+
KUSTOMIZE_STANDARD_OVERLAY := config/overlays/standard
75+
KUSTOMIZE_STANDARD_E2E_OVERLAY := config/overlays/standard-e2e
7576

7677
export RELEASE_MANIFEST := operator-controller.yaml
7778
export RELEASE_INSTALL := install.sh
@@ -80,8 +81,12 @@ export RELEASE_CATALOGS := default-catalogs.yaml
8081
# List of manifests that are checked in
8182
MANIFEST_HOME := ./manifests
8283
STANDARD_MANIFEST := ./manifests/standard.yaml
84+
STANDARD_E2E_MANIFEST := ./manifests/standard-e2e.yaml
8385
CATALOGS_MANIFEST := ./manifests/default-catalogs.yaml
8486

87+
# Manifest used by kind-deploy, which may be overridden by other targets
88+
SOURCE_MANIFEST := $(STANDARD_MANIFEST)
89+
8590
# Disable -j flag for make
8691
.NOTPARALLEL:
8792

@@ -147,7 +152,8 @@ manifests: $(CONTROLLER_GEN) $(KUSTOMIZE) #EXHELP Generate WebhookConfiguration,
147152
$(CONTROLLER_GEN) --load-build-tags=$(GO_BUILD_TAGS) webhook paths="./internal/catalogd/..." output:webhook:artifacts:config=$(KUSTOMIZE_CATD_WEBHOOKS_DIR)
148153
# Generate manifests stored in source-control
149154
mkdir -p $(MANIFEST_HOME)
150-
$(KUSTOMIZE) build $(KUSTOMIZE_BUILD_DIR) > $(STANDARD_MANIFEST)
155+
$(KUSTOMIZE) build $(KUSTOMIZE_STANDARD_OVERLAY) > $(STANDARD_MANIFEST)
156+
$(KUSTOMIZE) build $(KUSTOMIZE_STANDARD_E2E_OVERLAY) > $(STANDARD_E2E_MANIFEST)
151157

152158
.PHONY: generate
153159
generate: $(CONTROLLER_GEN) #EXHELP Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
@@ -247,8 +253,8 @@ image-registry: ## Build the testdata catalog used for e2e tests and push it to
247253
#
248254
# for example: ARTIFACT_PATH=/tmp/artifacts make test-e2e
249255
.PHONY: test-e2e
256+
test-e2e: SOURCE_MANIFEST := $(STANDARD_E2E_MANIFEST)
250257
test-e2e: KIND_CLUSTER_NAME := operator-controller-e2e
251-
test-e2e: KUSTOMIZE_BUILD_DIR := config/overlays/e2e
252258
test-e2e: GO_BUILD_EXTRA_FLAGS := -cover
253259
test-e2e: run image-registry prometheus e2e e2e-metrics e2e-coverage kind-clean #HELP Run e2e test suite on local kind cluster
254260

@@ -270,7 +276,6 @@ e2e-metrics: #HELP Request metrics from prometheus; place in ARTIFACT_PATH if se
270276
http://localhost:30900/api/v1/query > $(if $(ARTIFACT_PATH),$(ARTIFACT_PATH),.)/metrics.out
271277

272278
.PHONY: extension-developer-e2e
273-
extension-developer-e2e: KUSTOMIZE_BUILD_DIR := config/overlays/cert-manager
274279
extension-developer-e2e: KIND_CLUSTER_NAME := operator-controller-ext-dev-e2e
275280
extension-developer-e2e: export INSTALL_DEFAULT_CATALOGS := false
276281
extension-developer-e2e: run image-registry test-ext-dev-e2e kind-clean #EXHELP Run extension-developer e2e on local kind cluster
@@ -308,7 +313,8 @@ kind-load: $(KIND) #EXHELP Loads the currently constructed images into the KIND
308313
kind-deploy: export MANIFEST := $(RELEASE_MANIFEST)
309314
kind-deploy: export DEFAULT_CATALOG := $(RELEASE_CATALOGS)
310315
kind-deploy: manifests
311-
sed "s/cert-git-version/cert-$(VERSION)/g" $(STANDARD_MANIFEST) > $(MANIFEST)
316+
@echo -e "\n\U1F4D8 Using $(SOURCE_MANIFEST) as source manifest\n"
317+
sed "s/cert-git-version/cert-$(VERSION)/g" $(SOURCE_MANIFEST) > $(MANIFEST)
312318
cp $(CATALOGS_MANIFEST) $(DEFAULT_CATALOG)
313319
envsubst '$$DEFAULT_CATALOG,$$CERT_MGR_VERSION,$$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh | bash -s
314320

0 commit comments

Comments
 (0)