Skip to content

Commit 416812a

Browse files
nixpanicopenshift-cherrypick-robot
authored andcommitted
build: make the CSV package-name configurable
By setting PACKAGE_NAME as an variable for the `make generate bundle` command, the default "csi-addons" name can be adjusted. This is useful to prevent conflicts while installing the component, specially when products want to include their tested version of the CSI-Addons bundle. Signed-off-by: Niels de Vos <ndevos@redhat.com>
1 parent 386aa96 commit 416812a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ BUNDLE_IMG ?= quay.io/csiaddons/k8s-bundle
77
# set TAG to a release for consumption in the bundle
88
TAG ?= latest
99

10+
# the PACKAGE_NAME is included in the bundle/CSV and is used in catalogsources
11+
# for operators (like OperatorHub.io). Products that include the CSI-Addons
12+
# bundle should use a different PACKAGE_NAME to prevent conflicts.
13+
PACKAGE_NAME ?= csi-addons
14+
1015
# The default version of the bundle (CSV) can be found in
1116
# config/manifests/bases/csi-addons.clusterserviceversion.yaml . When tagging a
1217
# release, the bundle will be versioned with the same value as well.
@@ -59,7 +64,7 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust
5964
.PHONY: bundle
6065
bundle: kustomize operator-sdk
6166
cd config/manager && $(KUSTOMIZE) edit set image controller=$(CONTROLLER_IMG):$(TAG)
62-
$(KUSTOMIZE) build config/default | $(OPERATOR_SDK) generate bundle --manifests --metadata --package=csi-addons $(BUNDLE_VERSION)
67+
$(KUSTOMIZE) build config/default | $(OPERATOR_SDK) generate bundle --manifests --metadata --package=$(PACKAGE_NAME) $(BUNDLE_VERSION)
6368
mkdir -p ./bundle/tests/scorecard && $(KUSTOMIZE) build config/scorecard --output=./bundle/tests/scorecard/config.yaml
6469

6570
.PHONY: generate

0 commit comments

Comments
 (0)