Skip to content

Commit

Permalink
[docs] Steps for releasing Authorino Operator
Browse files Browse the repository at this point in the history
  • Loading branch information
didierofrivia committed Feb 20, 2024
1 parent 03b4263 commit 062b20e
Showing 1 changed file with 86 additions and 0 deletions.
86 changes: 86 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# How to release Authorino Operator

## Process

To release a version “v0.W.Z” of Authorino Operator in GitHub and Quay.io, follow these steps:

1. Pick a stable (released) version “v0.X.Y” of the operand known to be compatible with operator’s image for “v0.W.Z”;
if needed, [make a release of the operand first](https://github.com/Kuadrant/authorino/blob/main/RELEASE.md).

2. Run the GHA [Release operator](https://github.com/Kuadrant/authorino-operator/actions/workflows/release.yaml); make
sure to fill all the fields:

* Branch containing the release workflow file – default: `main`
* Commit SHA or branch name of the operator to release – usually: `main`
* Operator version to release (without prefix) – i.e. `0.W.Z`
* Authorino version the operator enables installations of (without prefix) – i.e. `0.X.Y`
* If the release is a prerelease
* Bundle and catalog channels (comma-separated) – usually: `stable`

3. Run the GHA [Build and push images](https://github.com/Kuadrant/authorino-operator/actions/workflows/build-images.yaml)
for the “v0.W.Z” tag, specifying ‘Authorino version’ equals to “0.X.Y” (without the leading “v”). This will cause the
new images (bundle and catalog included) to be built and pushed to the corresponding repos in
[quay.io/kuadrant](https://quay.io/organization/kuadrant).


### Publishing the Operator in OpenShift Community Operators
Open a PR in the [OpenShift Community Operators repo](http://github.com/redhat-openshift-ecosystem/community-operators-prod)
([example](https://github.com/redhat-openshift-ecosystem/community-operators-prod/pull/1595) |
[docs](https://redhat-openshift-ecosystem.github.io/community-operators-prod/operator-release-process/)).

The usual steps are:

1. Start a new branch named `authorino-operator-v0.W.Z`

2. Create a new directory _operators/authorino-operator/0.W.Z_ containing:

* Copy the bundle files from _github.com/kuadrant/authorino-operator/tree/v0.W.Z/bundle_
* Copy _github.com/kuadrant/authorino-operator/tree/v0.W.Z/bundle.Dockerfile_ with the proper fix to the COPY commands
(i.e. remove /bundle from the paths)

### Publishing the Operator in Kubernetes Community Operators (OperatorHub.io)

1. Open a PR in the [Kubernetes Community Operators repo](https://github.com/k8s-operatorhub/community-operators)
([example](https://github.com/k8s-operatorhub/community-operators/pull/1655) | [docs](https://operatorhub.io/contribute)).

2. The usual steps are the same as for the
[OpenShift Community Operators](https://docs.google.com/document/d/1tLveyv8Zwe0wKyfUTWOlEnFeMB5aVGqIVDUjVYWax0U/edit#heading=h.b5tapxn4sbk5)
hub.


## Notes on Authorino Operator’s automated builds and references to the Authorino manifests and default version

* PRs merged to the main branch of Authorino Operator cause a new image to be built (GH Action) and pushed automatically
to _quay.io/kuadrant/authorino-operator:<git-ref>_ – the _quay.io/kuadrant/authorino-operator:latest_ tag is also moved
to match the latest <git-ref>.

* Authorino Operator owns the manifests required by the operator, i.e. Authorino CRD + role definitions, and hosts a copy
of the operand’s manifests (CRD+roles), merged together with the deploy and bundle manifests:

* Stored in _config/deploy/manifests.yaml_ file that gathers resources of both operator (CRD, RBAC, Deployment, Service)
and operand (CRD, role definitions)
* Committing this file allows to install all the manifests and deploy an instance of the operator from a single
_kubectl apply_ command
* Tons of docs in the Authorino repo relying on that
* Make target manifests is used to generate the compiled version of all manifests (operator’s and operand’s).
It accepts as parameters:

* _VERSION_: sets the version of the manifests of the operator generated by the operator-sdk command and image tag of
the deployment added to _config/deploy/manifests.yaml_ (default: latest)
* _AUTHORINO_VERSION_: sets the operand’s branch that sources the manifests (CRD, role definitions) that are appended
to _config/deploy/manifests.yaml_ (default: latest)

* Changes in the operand’s CRD/role definitions out date the _config/deploy/manifests.yaml_ file, thus requiring a PR to
the operator repo ([example](https://github.com/Kuadrant/authorino-operator/pull/68))

* A make target _verify-manifests_ verifies consistency of the manifests
* Triggered in the CI tests
* Causes all PRs in the Operator repo to break whenever there’s a change in the operand’s API committed to the main
branch → requires immediate update of the copy of operand’s manifests in the main branch of the operator and rebase of all PRs

* Apart from the operand’s manifests pinned to a specific or latest version in the copy committed to
_config/deploy/manifests.yaml_, the Operator’s code contains hard-coded references to the default version of the operand
to install:
* See _v1beta1.DefaultAuthorinoImage_ (_api/v1beta1/authorino_types.go_)
* It can be overwritten in the Authorino CR → good for dev/test/staging workflows
* Set to `latest` in the main branch

0 comments on commit 062b20e

Please sign in to comment.