Skip to content

Commit

Permalink
Explicitly set replaces in the CSV
Browse files Browse the repository at this point in the history
skipRange on its own will cause the upgrade graph to clear in a catalog.
We need a replaces as well.

Signed-off-by: mprahl <[email protected]>
  • Loading branch information
mprahl committed Nov 9, 2023
1 parent 95c0fd6 commit 2fe9aee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 2fe9aee

Please sign in to comment.