Skip to content

Commit

Permalink
fix olm bundle labels (#705)
Browse files Browse the repository at this point in the history
  • Loading branch information
freeznet authored and jiangpengcheng committed Oct 25, 2023
1 parent 2fd6a01 commit bb35ec7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ redhat-certificated-bundle: yq kustomize manifests
cd config/manager && $(KUSTOMIZE) edit set image controller=$(shell docker inspect --format='{{json .RepoDigests}}' $(OPERATOR_IMG) | jq --arg IMAGE_TAG_BASE "$(IMAGE_TAG_BASE)" -c '.[] | select(index($$IMAGE_TAG_BASE))' -r)
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
$(YQ) eval -i ".metadata.annotations.\"olm.skipRange\" = \"<$(VERSION)\"" bundle/manifests/function-mesh.clusterserviceversion.yaml
$(YQ) eval -i ".metadata.annotations.\"olm.properties\" = ([{\"type\": \"olm.maxOpenShiftVersion\", \"value\": \"4.11\"}] | @json)" bundle/manifests/function-mesh.clusterserviceversion.yaml
$(YQ) eval -i ".metadata.annotations.\"olm.properties\" = ([{\"type\": \"olm.maxOpenShiftVersion\", \"value\": \"4.13\"}] | @json)" bundle/manifests/function-mesh.clusterserviceversion.yaml
$(YQ) eval -i ".metadata.annotations.createdAt = \"$(BUILD_DATETIME)\"" bundle/manifests/function-mesh.clusterserviceversion.yaml
$(YQ) eval -i ".metadata.annotations.containerImage = \"$(shell docker inspect --format='{{json .RepoDigests}}' $(OPERATOR_IMG) | jq --arg IMAGE_TAG_BASE "$(IMAGE_TAG_BASE)" -c '.[] | select(index($$IMAGE_TAG_BASE))' -r)\"" bundle/manifests/function-mesh.clusterserviceversion.yaml
$(YQ) eval -i '.annotations += {"operators.operatorframework.io.bundle.channel.default.v1":"alpha"}' bundle/metadata/annotations.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
containerImage: streamnative/function-mesh-operator:v0.0.0
description: The Function Mesh Operator manages the Pulsar Functions and Connectors
deployed on a Kubernetes cluster.
operatorhub.io/ui-metadata-max-k8s-version: "1.24"
operatorhub.io/ui-metadata-max-k8s-version: "1.26"
repository: https://github.com/streamnative/function-mesh
support: StreamNative
name: function-mesh.v0.0.0
Expand Down Expand Up @@ -72,7 +72,7 @@ spec:
- email: [email protected]
name: Function Mesh
maturity: alpha
minKubeVersion: v1.17.0
minKubeVersion: v1.23.0
provider:
name: StreamNative
url: https://streamnative.io
Expand Down
4 changes: 2 additions & 2 deletions hack/postprocess-bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
# These labels are required to be in the bundle.Dockerfile, but can't be added by the operator-sdk automatically
cat <<EOF >> bundle.Dockerfile
# Certified Openshift required labels
LABEL com.redhat.openshift.versions="v4.8-v4.11"
LABEL com.redhat.openshift.versions="v4.10-v4.13"
LABEL com.redhat.delivery.operator.bundle=true
LABEL com.redhat.delivery.backport=true
LABEL operators.operatorframework.io.bundle.channel.default.v1="alpha"
EOF

# Add them to the bundle metadata also
yq eval -i '.annotations."com.redhat.openshift.versions" = "v4.8-v4.11"' bundle/metadata/annotations.yaml
yq eval -i '.annotations."com.redhat.openshift.versions" = "v4.10-v4.13"' bundle/metadata/annotations.yaml
yq eval -i '.annotations."com.redhat.delivery.operator.bundle" = true' bundle/metadata/annotations.yaml
yq eval -i '.annotations."com.redhat.delivery.backport" = true' bundle/metadata/annotations.yaml
yq eval -i '.annotations."operators.operatorframework.io.bundle.channel.default.v1" = "alpha"' bundle/metadata/annotations.yaml
Expand Down

0 comments on commit bb35ec7

Please sign in to comment.