diff --git a/Makefile b/Makefile index 6d915b60..5a258fbe 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 diff --git a/bundle/manifests/limitador-operator.clusterserviceversion.yaml b/bundle/manifests/limitador-operator.clusterserviceversion.yaml index 4a347d34..9c7113a7 100644 --- a/bundle/manifests/limitador-operator.clusterserviceversion.yaml +++ b/bundle/manifests/limitador-operator.clusterserviceversion.yaml @@ -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 @@ -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 diff --git a/config/manifests/bases/limitador-operator.clusterserviceversion.yaml b/config/manifests/bases/limitador-operator.clusterserviceversion.yaml index 421477bd..1ba3ba90 100644 --- a/config/manifests/bases/limitador-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/limitador-operator.clusterserviceversion.yaml @@ -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