From 04d2b901964bf6cbb0119ecf155b8a19ad16c322 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Wed, 24 Jan 2024 20:13:45 +0100 Subject: [PATCH 1/4] Add missing annotation for OpenShift #2557 Signed-off-by: Israel Blancas --- bundle.Dockerfile | 1 + bundle/metadata/annotations.yaml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/bundle.Dockerfile b/bundle.Dockerfile index af479f2fa4..8abfc22fa0 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -9,6 +9,7 @@ LABEL operators.operatorframework.io.bundle.channels.v1=alpha LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.29.0 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 +LABEL com.redhat.openshift.versions="v4.11-v4.14" # Labels for testing. LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index b0f3b46044..780fb1432e 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.14" \ No newline at end of file From eda7121a6947c5ea21abb89fa6f7622e532dca77 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Wed, 24 Jan 2024 23:23:22 +0100 Subject: [PATCH 2/4] Fix autogeneration Signed-off-by: Israel Blancas --- Makefile | 3 ++- bundle.Dockerfile | 2 +- bundle/metadata/annotations.yaml | 2 +- hack/add-openshift-annotations.sh | 11 +++++++++++ 4 files changed, 15 insertions(+), 3 deletions(-) create mode 100755 hack/add-openshift-annotations.sh diff --git a/Makefile b/Makefile index f7c7900e36..80baefe2d6 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/bundle.Dockerfile b/bundle.Dockerfile index 8abfc22fa0..d64092da55 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -9,7 +9,6 @@ LABEL operators.operatorframework.io.bundle.channels.v1=alpha LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.29.0 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 -LABEL com.redhat.openshift.versions="v4.11-v4.14" # Labels for testing. LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 @@ -19,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.14" diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index 780fb1432e..e5b7267639 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -14,4 +14,4 @@ annotations: operators.operatorframework.io.test.config.v1: tests/scorecard/ # OpenShift specific annotations - com.redhat.openshift.versions: "v4.11-v4.14" \ No newline at end of file + com.redhat.openshift.versions: "v4.11-v4.14" diff --git a/hack/add-openshift-annotations.sh b/hack/add-openshift-annotations.sh new file mode 100755 index 0000000000..8d8fcdf664 --- /dev/null +++ b/hack/add-openshift-annotations.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +OPENSHIFT_VERSIONS="\"v4.11-v4.14\"" + +{ + 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 From a6c1fbc219a5d327492d67fc92bdaf5e7500ae69 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Wed, 24 Jan 2024 23:28:03 +0100 Subject: [PATCH 3/4] Add changelog Signed-off-by: Israel Blancas --- .chloggen/fix-annotations-for-openshift.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 .chloggen/fix-annotations-for-openshift.yaml 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: From f378065b9bb90f93d73d37faf508500314b18ab4 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Wed, 31 Jan 2024 15:59:56 +0100 Subject: [PATCH 4/4] Apply changes requested in code review Signed-off-by: Israel Blancas --- RELEASE.md | 19 ++++++++++--------- bundle.Dockerfile | 2 +- bundle/metadata/annotations.yaml | 2 +- hack/add-openshift-annotations.sh | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) 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 d64092da55..367ef8fe76 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -18,4 +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.14" +LABEL com.redhat.openshift.versions="v4.11-v4.15" diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index e5b7267639..1dc119a11f 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -14,4 +14,4 @@ annotations: operators.operatorframework.io.test.config.v1: tests/scorecard/ # OpenShift specific annotations - com.redhat.openshift.versions: "v4.11-v4.14" + com.redhat.openshift.versions: "v4.11-v4.15" diff --git a/hack/add-openshift-annotations.sh b/hack/add-openshift-annotations.sh index 8d8fcdf664..b4ac3ad1b8 100755 --- a/hack/add-openshift-annotations.sh +++ b/hack/add-openshift-annotations.sh @@ -1,6 +1,6 @@ #!/bin/bash -OPENSHIFT_VERSIONS="\"v4.11-v4.14\"" +OPENSHIFT_VERSIONS="\"v4.11-v4.15\"" { echo ""