Skip to content

Commit

Permalink
build: make the CSV package-name configurable
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
nixpanic authored and mergify[bot] committed Jan 18, 2022
1 parent c1e575d commit 44e3984
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ BUNDLE_IMG ?= quay.io/csiaddons/k8s-bundle
# set TAG to a release for consumption in the bundle
TAG ?= latest

# the PACKAGE_NAME is included in the bundle/CSV and is used in catalogsources
# for operators (like OperatorHub.io). Products that include the CSI-Addons
# bundle should use a different PACKAGE_NAME to prevent conflicts.
PACKAGE_NAME ?= csi-addons

# The default version of the bundle (CSV) can be found in
# config/manifests/bases/csi-addons.clusterserviceversion.yaml . When tagging a
# release, the bundle will be versioned with the same value as well.
Expand Down Expand Up @@ -59,7 +64,7 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust
.PHONY: bundle
bundle: kustomize operator-sdk
cd config/manager && $(KUSTOMIZE) edit set image controller=$(CONTROLLER_IMG):$(TAG)
$(KUSTOMIZE) build config/default | $(OPERATOR_SDK) generate bundle --manifests --metadata --package=csi-addons $(BUNDLE_VERSION)
$(KUSTOMIZE) build config/default | $(OPERATOR_SDK) generate bundle --manifests --metadata --package=$(PACKAGE_NAME) $(BUNDLE_VERSION)
mkdir -p ./bundle/tests/scorecard && $(KUSTOMIZE) build config/scorecard --output=./bundle/tests/scorecard/config.yaml

.PHONY: generate
Expand Down

0 comments on commit 44e3984

Please sign in to comment.