From 2fe9aee124fc00e80a67653f3465537ffd0b4733 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 | 2 +- bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2550604a5..3d88a2fe8 100644 --- a/Makefile +++ b/Makefile @@ -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"