Skip to content

Commit b4e723b

Browse files
committed
[bundle] Providing the replaces directive in CSV
1 parent fdb0c52 commit b4e723b

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

Makefile

+6
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ BUNDLE_IMG ?= $(IMAGE_TAG_BASE)-bundle:$(IMAGE_TAG)
8888
# Image URL to use all building/pushing image targets
8989
DEFAULT_IMG ?= $(IMAGE_TAG_BASE):$(IMAGE_TAG)
9090
IMG ?= $(DEFAULT_IMG)
91+
92+
# Limitador Operator replaced version
93+
DEFAULT_REPLACES_VERSION = 0.0.0-alpha
94+
REPLACES_VERSION ?= $(DEFAULT_REPLACES_VERSION)
95+
9196
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
9297
ENVTEST_K8S_VERSION = 1.22
9398

@@ -289,6 +294,7 @@ bundle: $(OPM) $(YQ) manifests kustomize operator-sdk ## Generate bundle manifes
289294
V="limitador-operator.v$(BUNDLE_VERSION)" $(YQ) eval '.metadata.name = strenv(V)' -i config/manifests/bases/limitador-operator.clusterserviceversion.yaml
290295
V="$(BUNDLE_VERSION)" $(YQ) eval '.spec.version = strenv(V)' -i config/manifests/bases/limitador-operator.clusterserviceversion.yaml
291296
V="$(IMG)" $(YQ) eval '.metadata.annotations.containerImage = strenv(V)' -i config/manifests/bases/limitador-operator.clusterserviceversion.yaml
297+
V="limitador-operator.v$(REPLACES_VERSION)" $(YQ) eval '.spec.replaces = strenv(V)' -i config/manifests/bases/limitador-operator.clusterserviceversion.yaml
292298
# Generate bundle
293299
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle -q --overwrite --version $(BUNDLE_VERSION) $(BUNDLE_METADATA_OPTS)
294300
# Validate bundle manifests

bundle/manifests/limitador-operator.clusterserviceversion.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -242,3 +242,4 @@ spec:
242242
- image: quay.io/kuadrant/limitador:latest
243243
name: limitador
244244
version: 0.0.0
245+
replaces: limitador-operator.v0.0.0-alpha

config/manifests/bases/limitador-operator.clusterserviceversion.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,4 @@ spec:
5454
name: Red Hat
5555
url: https://github.com/Kuadrant/limitador-operator
5656
version: 0.0.0
57+
replaces: limitador-operator.v0.0.0-alpha

0 commit comments

Comments
 (0)