Skip to content

Commit

Permalink
[bundle] Providing the replaces directive in CSV
Browse files Browse the repository at this point in the history
  • Loading branch information
didierofrivia committed Sep 27, 2023
1 parent fdb0c52 commit dec689f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ BUNDLE_IMG ?= $(IMAGE_TAG_BASE)-bundle:$(IMAGE_TAG)
# Image URL to use all building/pushing image targets
DEFAULT_IMG ?= $(IMAGE_TAG_BASE):$(IMAGE_TAG)
IMG ?= $(DEFAULT_IMG)

# Limitador Operator replaced version
DEFAULT_REPLACES_VERSION = 0.0.0-alpha
REPLACES_VERSION ?= $(DEFAULT_REPLACES_VERSION)

# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.22

Expand Down Expand Up @@ -289,6 +294,7 @@ bundle: $(OPM) $(YQ) manifests kustomize operator-sdk ## Generate bundle manifes
V="limitador-operator.v$(BUNDLE_VERSION)" $(YQ) eval '.metadata.name = strenv(V)' -i config/manifests/bases/limitador-operator.clusterserviceversion.yaml
V="$(BUNDLE_VERSION)" $(YQ) eval '.spec.version = strenv(V)' -i config/manifests/bases/limitador-operator.clusterserviceversion.yaml
V="$(IMG)" $(YQ) eval '.metadata.annotations.containerImage = strenv(V)' -i config/manifests/bases/limitador-operator.clusterserviceversion.yaml
V="limitador-operator.v$(REPLACES_VERSION)" $(YQ) eval '.spec.replaces = strenv(V)' -i config/manifests/bases/limitador-operator.clusterserviceversion.yaml
# Generate bundle
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle -q --overwrite --version $(BUNDLE_VERSION) $(BUNDLE_METADATA_OPTS)
# Validate bundle manifests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ metadata:
capabilities: Basic Install
categories: Integration & Delivery
containerImage: quay.io/kuadrant/limitador-operator:latest
createdAt: "2023-09-01T15:47:50Z"
createdAt: "2023-09-27T14:09:01Z"
operators.operatorframework.io/builder: operator-sdk-v1.28.1
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/Kuadrant/limitador-operator
Expand Down Expand Up @@ -241,4 +241,5 @@ spec:
relatedImages:
- image: quay.io/kuadrant/limitador:latest
name: limitador
replaces: limitador-operator.v0.0.0-alpha
version: 0.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ spec:
provider:
name: Red Hat
url: https://github.com/Kuadrant/limitador-operator
replaces: limitador-operator.v0.0.0-alpha
version: 0.0.0

0 comments on commit dec689f

Please sign in to comment.