Skip to content

Commit

Permalink
Add missing annotation for OpenShift (#2562)
Browse files Browse the repository at this point in the history
* Add missing annotation for OpenShift #2557

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Fix autogeneration

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Add changelog

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Apply changes requested in code review

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

---------

Signed-off-by: Israel Blancas <iblancasa@gmail.com>
  • Loading branch information
iblancasa authored Jan 31, 2024
1 parent e782c1a commit 21a2af9
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 10 deletions.
16 changes: 16 additions & 0 deletions .chloggen/fix-annotations-for-openshift.yaml
Original file line number Diff line number Diff line change
@@ -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:
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 10 additions & 9 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
3 changes: 3 additions & 0 deletions bundle/metadata/annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
11 changes: 11 additions & 0 deletions hack/add-openshift-annotations.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 21a2af9

Please sign in to comment.