Skip to content

Commit

Permalink
fix(olm): set minKubeVersion and Openshift version
Browse files Browse the repository at this point in the history
  • Loading branch information
squakez committed Apr 23, 2024
1 parent 2cb8476 commit 7d0e521
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ spec:
- email: pcongius@redhat.com
name: Pasquale Congiusti
maturity: alpha
minKubeVersion: 1.14.0
minKubeVersion: 1.24.0
provider:
name: Red Hat
url: https://access.redhat.com/products/red-hat-integration
Expand Down
7 changes: 7 additions & 0 deletions script/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,9 @@ ifneq ($(origin PACKAGE), undefined)
BUNDLE_PACKAGE := --package=$(PACKAGE)
endif
BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL) $(BUNDLE_PACKAGE)
# TODO automate these configuration retrieving the content from go.mod
BUNDLE_METADATA_OPENSHIFT_VERSION ?= "v4.14"
MIN_KUBE_VERSION ?= "1.24.0"

#
# Tailor the manifest according to default values for this project
Expand All @@ -553,6 +556,7 @@ pre-bundle:
@sed -i 's/^ displayName: .*/ displayName: $(CSV_DISPLAY_NAME)/' $(CSV_PATH)
@sed -i 's/^ replaces: .*/ replaces: $(CSV_REPLACES)/' $(CSV_PATH)
@sed -i 's/^ version: .*/ version: $(CSV_VERSION)/' $(CSV_PATH)
@sed -i 's/^ minKubeVersion: .*/ minKubeVersion: $(MIN_KUBE_VERSION)/' $(CSV_PATH)

bundle: set-version generate-crd kustomize operator-sdk pre-bundle $(BUNDLE_CAMEL_APIS)
@# Sets the operator image to the preferred image:tag
Expand All @@ -570,6 +574,9 @@ else
endif
@# Adds the licence headers to the csv file
./script/add_license.sh bundle/manifests ./script/headers/yaml.txt
# Rename the CSV name to conform with the existing released operator versions
# This cannot happen in pre-bundle as the operator-sdk generation expects a CSV name the same as PACKAGE
@echo " com.redhat.openshift.versions : $(BUNDLE_METADATA_OPENSHIFT_VERSION)" >> ./bundle/metadata/annotations.yaml
$(OPERATOR_SDK) bundle validate ./bundle
# operator-sdk requires the name of the operator to be the PACKAGE
# However, the historical name of the operator has the suffix 'operator' so this should
Expand Down

0 comments on commit 7d0e521

Please sign in to comment.