Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automation to add the 'spec.replaces' annotation #1748

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

pjuarezd
Copy link
Member

This allows to have an update graph in Openshift Marketplace Operator updates.

During release we will query the readhat catalog API to get the latest published Operator and set that version as the one to be replaced.

With this no more manual intervention to set the version we are replacing

Example output:

RELEASE=5.0.8 ./olm.sh
operator-sdk version: "v1.22.2", commit: "da3346113a8a75e11225f586482934000504a60f", kubernetes version: "1.24.1", go version: "go1.18.4", GOOS: "darwin", GOARCH: "arm64"
minioVersionInExample: quay.io/minio/minio:RELEASE.2023-07-21T21-12-44Z
minioVersionDigest: quay.io/minio/minio@sha256:8e5e9490cd50018457d53a447e9881eaef6a327b320991347c2ea01db5f3c784
 
certified-operators
package: minio-operator
Generating bundle manifests
WARN[0000] ClusterServiceVersion validation: [OperationFailed] provided API should have an example annotation 
pinning image versions to digests instead of tags
...
To provide replacement for upgrading Operator...
replaces: minio-operator.v5.0.7
clean released annotations
clean root level annotations.yaml

example bundles/certified-operators/5.0.8/manifests/minio-operator.clusterserviceversion.yaml

piVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
  annotations:
    name: minio-operator.v5.0.8
...
  version: 5.0.8
  replaces: minio-operator.v5.0.7

example bundles/redhat-marketplace/5.0.8/manifests/minio-operator-rhmp.clusterserviceversion.yaml

piVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
  annotations:
    name: minio-operator-rhmp.v5.0.8
...
  version: 5.0.8
  replaces: minio-operator.v5.0.7

This allows to have an update graph in Openshift Marketplace Operator updates

Signed-off-by: pjuarezd <pjuarezd@users.noreply.github.com>
@pjuarezd pjuarezd self-assigned this Aug 30, 2023
@pjuarezd pjuarezd added the enhancement New feature or request label Aug 30, 2023
@pjuarezd
Copy link
Member Author

closes #1309

Copy link
Contributor

@shtripat shtripat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@pjuarezd pjuarezd merged commit b552d64 into minio:master Aug 31, 2023
@pjuarezd pjuarezd deleted the openshift-marketplace-replaces branch August 31, 2023 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants