From 72a59c9d685292e7bc41398cf129e55994604d8e Mon Sep 17 00:00:00 2001 From: mprahl Date: Thu, 9 Nov 2023 13:30:43 -0500 Subject: [PATCH] Explicitly set replaces in the CSV skipRange on its own will cause the upgrade graph to clear in a catalog. We need a replaces as well. Signed-off-by: mprahl --- Makefile | 4 ++-- .../manifests/gatekeeper-operator.clusterserviceversion.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2550604a5..04a88b277 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ VERSION ?= 3.11.1 # Replaces Operator version # Set this when when there is a new patch release in the channel. -REPLACES_VERSION ?= none +REPLACES_VERSION ?= 0.2.6 LOCAL_BIN ?= $(PWD)/ci-tools/bin export PATH := $(LOCAL_BIN):$(PATH) @@ -307,11 +307,11 @@ bundle: operator-sdk manifests kustomize ## Generate bundle manifests and metada $(SED) -i 's/^ version:.*/ version: "$(VERSION)"/' bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml $(SED) -i '/^ createdAt:.*/d' bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml $(SED) -i 's/$(CHANNELS)/"$(CHANNELS)"/g' bundle/metadata/annotations.yaml + $(SED) -i 's/^ olm.skipRange:.*/ olm.skipRange: "<$(VERSION)"/' bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml ifneq ($(REPLACES_VERSION), none) $(SED) -i 's/^ replaces:.*/ replaces: gatekeeper-operator.v$(REPLACES_VERSION)/' bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml else $(SED) -i 's/^ replaces:.*/ # replaces: none/' bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml - $(SED) -i 's/^ olm.skipRange:.*/ olm.skipRange: "<$(VERSION)"/' bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml endif $(OPERATOR_SDK) bundle validate ./bundle diff --git a/bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml b/bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml index 6603792c3..1343d436d 100644 --- a/bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml +++ b/bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml @@ -516,5 +516,5 @@ spec: relatedImages: - image: openpolicyagent/gatekeeper:v3.11.1 name: gatekeeper - # replaces: none + replaces: gatekeeper-operator.v0.2.6 version: "3.11.1"