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 9, 2024
1 parent f6d38bf commit d5a80e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ metadata:
categories: Integration & Delivery
certified: "false"
containerImage: docker.io/apache/camel-k:2.4.0-SNAPSHOT
createdAt: 2024-04-08T13:18:44Z
createdAt: 2024-04-09T09:51:41Z
description: Apache Camel K is a lightweight integration platform, born on Kubernetes,
with serverless superpowers.
operators.operatorframework.io/builder: operator-sdk-v1.16.0
Expand Down Expand Up @@ -167,7 +167,7 @@ spec:
- email: [email protected]
name: The Apache Software Foundation
maturity: alpha
minKubeVersion: 1.11.0
minKubeVersion: 1.24.0
provider:
name: The Apache Software Foundation
replaces: camel-k-operator.v2.3.0
Expand Down
5 changes: 5 additions & 0 deletions script/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,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 @@ -658,6 +661,7 @@ pre-bundle:
@sed -i 's/^ name: .*.\(v.*\)/ name: $(CSV_NAME)/' $(CSV_PATH)
@sed -i 's/^ displayName: .*/ displayName: $(CSV_DISPLAY_NAME)/' $(CSV_PATH)
@sed -i 's/^ version: .*/ version: $(CSV_VERSION)/' $(CSV_PATH)
@sed -i 's/^ minKubeVersion: .*/ minKubeVersion: $(MIN_KUBE_VERSION)/' $(CSV_PATH)
@if grep -q replaces $(CSV_PATH); \
then sed -i 's/^ replaces: .*/ replaces: $(CSV_REPLACES)/' $(CSV_PATH); \
else sed -i '/ version: ${CSV_VERSION}/a \ \ replaces: $(CSV_REPLACES)' $(CSV_PATH); \
Expand All @@ -680,6 +684,7 @@ bundle: set-version kustomize operator-sdk pre-bundle $(BUNDLE_CAMEL_APIS)
# 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
@sed -i "s/^ name: $(CSV_NAME)/ name: $(CSV_PRODUCTION_NAME)/" $(CSV_PRODUCTION_PATH)
@echo " com.redhat.openshift.versions : $(BUNDLE_METADATA_OPENSHIFT_VERSION)" >> ./bundle/metadata/annotations.yaml
$(OPERATOR_SDK) bundle validate ./bundle

# Build the bundle image.
Expand Down

0 comments on commit d5a80e4

Please sign in to comment.