From 43fec0388faf016660aee1fe5b4cabd4d48ce28d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 23 Nov 2023 19:11:16 -0500 Subject: [PATCH] chore(makefile): option to generate bundles with quickstart on ocp (#687) (#689) Signed-off-by: Thuan Vo (cherry picked from commit 04b0fbbfd2d070bfb7697b75e853a82b0c46c89f) Co-authored-by: Thuan Vo --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index c65a2313..90d30a4c 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,7 @@ IMAGE_TAG_BASE ?= $(IMAGE_NAMESPACE)/$(OPERATOR_NAME) # Default bundle image tag BUNDLE_IMG ?= $(IMAGE_TAG_BASE)-bundle:$(BUNDLE_VERSION) BUNDLE_IMGS ?= $(BUNDLE_IMG) +BUNDLE_MODE ?= k8s # Default catalog image tag CATALOG_IMG ?= $(IMAGE_TAG_BASE)-catalog:$(BUNDLE_VERSION) @@ -275,6 +276,9 @@ catalog-build: opm ## Build a catalog image. bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metadata, then validate generated files. $(OPERATOR_SDK) generate kustomize manifests -q cd config/manager && $(KUSTOMIZE) edit set image controller=$(OPERATOR_IMG) +ifeq ($(BUNDLE_MODE), ocp) + cd config/manifests && $(KUSTOMIZE) edit add base ../openshift +endif $(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS) $(OPERATOR_SDK) bundle validate ./bundle