Skip to content

Commit 8f63732

Browse files
chore: update OCP version (#1793)
Even that we moved to File Based Catalog, when publishing a bundle the `com.redhat.openshift.versions` metada is checked. It does not affect the publishing. Note that the publishing is done in a different PR, where the OCP versions are specified. See [validation](https://github.com/redhat-openshift-ecosystem/certification-releases/blob/main/4.9/ga/troubleshooting.md#get-supported-versions). See failing bundle [PR](redhat-openshift-ecosystem/certified-operators#6418 (comment)) without the annotation. <img width="902" height="58" alt="image" src="https://github.com/user-attachments/assets/789d0028-fcb5-4e4e-b482-8e856dfc1b4c" />
2 parents a1f3373 + 9b3b7e1 commit 8f63732

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ IMAGE_NAME?=network-operator
5050
CONTROLLER_IMAGE=$(REGISTRY)/$(IMAGE_NAME)
5151
IMAGE_BUILD_OPTS?=
5252
BUNDLE_IMG?=network-operator-bundle:$(VERSION)
53+
BUNDLE_OCP_VERSIONS?=v4.17-v4.20
5354
# BUNDLE_GEN_FLAGS are the flags passed to the operator-sdk generate bundle command
5455
BUNDLE_GEN_FLAGS ?= -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
5556
BUILD_ARCH= amd64 arm64
@@ -406,7 +407,7 @@ bundle: $(OPERATOR_SDK) $(KUSTOMIZE) manifests ## Generate bundle manifests and
406407
cd config/manager && $(KUSTOMIZE) edit set image controller=$(TAG)
407408
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
408409
git checkout -- config/manager/kustomization.yaml
409-
GO=$(GO) TAG=$(TAG) hack/scripts/ocp-bundle-postprocess.sh
410+
GO=$(GO) BUNDLE_OCP_VERSIONS=$(BUNDLE_OCP_VERSIONS) TAG=$(TAG) hack/scripts/ocp-bundle-postprocess.sh
410411
$(OPERATOR_SDK) bundle validate ./bundle
411412

412413
.PHONY: bundle-build

bundle/metadata/annotations.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ annotations:
1313
# Annotations for testing.
1414
operators.operatorframework.io.test.mediatype.v1: scorecard+v1
1515
operators.operatorframework.io.test.config.v1: tests/scorecard/
16+
com.redhat.openshift.versions: v4.15-v4.18

hack/scripts/ocp-bundle-postprocess.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@ rm hack/related_images.yaml
3535
# Escape the tag annotation value for sed
3636
ESCAPED_TAG=$(printf '%s\n' "$TAG" | sed -e 's/[]\/$*.^[]/\\&/g')
3737
sed -i "0,/annotations:/s/annotations:/annotations:\n containerImage: $ESCAPED_TAG/" bundle/manifests/nvidia-network-operator.clusterserviceversion.yaml
38+
# Add OpenShift versions in metadata/annotations.yaml
39+
echo " com.redhat.openshift.versions: $BUNDLE_OCP_VERSIONS" >> bundle/metadata/annotations.yaml

0 commit comments

Comments
 (0)