Skip to content

Commit

Permalink
Merge pull request #320 from iamniting/release-4.10
Browse files Browse the repository at this point in the history
Bug 2213450:[release-4.10] makefile: block OCP upgrades beyond the X+1 version
  • Loading branch information
openshift-merge-robot authored Jul 3, 2023
2 parents 0f05f67 + 8c9a975 commit ed984c9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metada
cd config/default && $(KUSTOMIZE) edit set image rbac-proxy=$(RBAC_PROXY_IMG)
cd config/console && $(KUSTOMIZE) edit set image odf-console=$(ODF_CONSOLE_IMG)
cd config/manifests/bases && $(KUSTOMIZE) edit add annotation --force 'olm.skipRange':"$(SKIP_RANGE)" && \
$(KUSTOMIZE) edit add annotation --force 'olm.properties':'[{"type": "olm.maxOpenShiftVersion", "value": "$(MAX_OCP_VERSION)"}]' && \
$(KUSTOMIZE) edit add patch --name odf-operator.v0.0.0 --kind ClusterServiceVersion\
--patch '[{"op": "replace", "path": "/spec/replaces", "value": "$(REPLACES)"}]'
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
Expand Down
1 change: 1 addition & 0 deletions bundle/manifests/odf-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ metadata:
containerImage: quay.io/ocs-dev/odf-operator:latest
description: OpenShift Data Foundation provides a common control plane for storage
solutions on OpenShift Container Platform.
olm.properties: '[{"type": "olm.maxOpenShiftVersion", "value": "4.11"}]'
olm.skipRange: ""
operatorframework.io/initialization-resource: |-
{
Expand Down
1 change: 1 addition & 0 deletions config/manifests/bases/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ patchesStrategicMerge:
- odf-operator.csv.icon.yaml
- odf-operator.csv.card-description.yaml
commonAnnotations:
olm.properties: '[{"type": "olm.maxOpenShiftVersion", "value": "4.11"}]'
olm.skipRange: ""
patches:
- patch: '[{"op": "replace", "path": "/spec/replaces", "value": ""}]'
Expand Down
4 changes: 4 additions & 0 deletions hack/make-bundle-vars.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= 4.10.0

# MAX_OCP_VERSION variable specifies the maximum supported version of OCP.
# Its purpose is to add an annotation to the CSV file, blocking OCP upgrades beyond the X+1 version.
MAX_OCP_VERSION := $(shell echo $(VERSION) | awk -F. '{print $$1"."$$2+1}')

# DEFAULT_CHANNEL defines the default channel used in the bundle.
# Add a new line here if you would like to change its default config. (E.g DEFAULT_CHANNEL = "stable")
# To re-generate a bundle for any other default channel without changing the default setup, you can:
Expand Down

0 comments on commit ed984c9

Please sign in to comment.