diff --git a/.chloggen/fix-annotations-for-openshift.yaml b/.chloggen/fix-annotations-for-openshift.yaml new file mode 100755 index 0000000000..64ca547f1d --- /dev/null +++ b/.chloggen/fix-annotations-for-openshift.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Fix annotations required by the OpenShift Operator Hub + +# One or more tracking issues related to the change +issues: [2557] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/Makefile b/Makefile index 0db18257e4..f80e11d3c8 100644 --- a/Makefile +++ b/Makefile @@ -454,8 +454,9 @@ operator-sdk: bundle: kustomize operator-sdk manifests set-image-controller api-docs $(OPERATOR_SDK) generate kustomize manifests -q $(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS) - $(OPERATOR_SDK) bundle validate ./bundle ./hack/ignore-createdAt-bundle.sh + ./hack/add-openshift-annotations.sh + $(OPERATOR_SDK) bundle validate ./bundle .PHONY: reset reset: kustomize operator-sdk manifests diff --git a/RELEASE.md b/RELEASE.md index 6ffbd1c009..e683a3ba29 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -4,17 +4,18 @@ Steps to release a new version of the OpenTelemetry Operator: 1. Change the `versions.txt`, so that it lists the target version of the OpenTelemetry Collector (operand), and the desired version for the target allocator and the operator. The `major.minor` should typically match, with the patch portion being possibly different. 2. Change the `autoinstrumentation-*` versions in `versions.txt` as per the latest supported versions in `autoinstrumentation/`. - - :warning: DO NOT BUMP JAVA PAST `1.32.X` AND DO NOT BUMP .NET PAST `1.2.0`. :warning: Upgrades past these versions will introduce breaking HTTP semantic convention changes. -3. Run `make bundle DOCKER_USER=open-telemetry VERSION=0.38.0`, using the version that will be released. -4. Change the compatibility matrix in the [readme](./README.md) file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version. Remove the oldest entry. -5. Add the changes to the changelog. Manually add versions of all operator components. -6. Check the OpenTelemetry Collector's changelog and ensure migration steps are present in `pkg/collector/upgrade` -7. Once the changes above are merged and available in `main`, tag it with the desired version, prefixed with `v`: `v0.38.0` -8. The GitHub Workflow will take it from here, creating a GitHub release with the generated artifacts (manifests) and publishing the images -9. The GitHub Workflow, submits two pull requests to the Operator hub repositories. Make sure the pull requests are approved and merged. + - :warning: DO NOT BUMP JAVA PAST `1.32.X` AND DO NOT BUMP .NET PAST `1.2.0`. :warning: Upgrades past these versions will introduce breaking HTTP semantic convention changes. +3. Check if the compatible OpenShift versions are updated in the `hack/add-openshift-annotations.sh` script. +4. Run `make bundle DOCKER_USER=open-telemetry VERSION=0.38.0`, using the version that will be released. +5. Change the compatibility matrix in the [readme](./README.md) file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version. Remove the oldest entry. +6. Add the changes to the changelog. Manually add versions of all operator components. +7. Check the OpenTelemetry Collector's changelog and ensure migration steps are present in `pkg/collector/upgrade` +8. Once the changes above are merged and available in `main`, tag it with the desired version, prefixed with `v`: `v0.38.0` +9. The GitHub Workflow will take it from here, creating a GitHub release with the generated artifacts (manifests) and publishing the images +10. The GitHub Workflow, submits two pull requests to the Operator hub repositories. Make sure the pull requests are approved and merged. 1. `community-operators-prod` is used by OLM on OpenShift. Example: [`operator-framework/community-operators-prod`](https://github.com/redhat-openshift-ecosystem/community-operators-prod/pull/494) 1. `community-operators` is used by Operatorhub.io. Example: [`operator-framework/community-operators`](https://github.com/k8s-operatorhub/community-operators/pull/461) -10. Update release schedule table, by moving the current release manager to the end of the table with updated release version. +11. Update release schedule table, by moving the current release manager to the end of the table with updated release version. ## Generating the changelog diff --git a/bundle.Dockerfile b/bundle.Dockerfile index af479f2fa4..367ef8fe76 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -18,3 +18,4 @@ LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ COPY bundle/manifests /manifests/ COPY bundle/metadata /metadata/ COPY bundle/tests/scorecard /tests/scorecard/ +LABEL com.redhat.openshift.versions="v4.11-v4.15" diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index b0f3b46044..1dc119a11f 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -12,3 +12,6 @@ annotations: # Annotations for testing. operators.operatorframework.io.test.mediatype.v1: scorecard+v1 operators.operatorframework.io.test.config.v1: tests/scorecard/ + + # OpenShift specific annotations + com.redhat.openshift.versions: "v4.11-v4.15" diff --git a/hack/add-openshift-annotations.sh b/hack/add-openshift-annotations.sh new file mode 100755 index 0000000000..b4ac3ad1b8 --- /dev/null +++ b/hack/add-openshift-annotations.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +OPENSHIFT_VERSIONS="\"v4.11-v4.15\"" + +{ + echo "" + echo " # OpenShift specific annotations" + echo " com.redhat.openshift.versions: $OPENSHIFT_VERSIONS" +} >> bundle/metadata/annotations.yaml + +echo "LABEL com.redhat.openshift.versions=$OPENSHIFT_VERSIONS" >> bundle.Dockerfile