Skip to content

Commit f800ed3

Browse files
authored
Improve releasing doc about OLM bundle (#11914)
Signed-off-by: Paolo Patierno <[email protected]>
1 parent 9a0f0ca commit f800ed3

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

development-docs/RELEASE.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,11 @@ In order to provide the bundle for a new release, you can use the previous one a
144144
Create a folder for the new release by copying the previous one and make the following changes:
145145
146146
* if releasing a new minor or major version (rather than fix), change the `metadata/annotations.yaml` to update the second channel listed next to `operators.operatorframework.io.bundle.channels.v1` to the new release version range (e.g. `strimzi-0.45.x`).
147-
* copy the CRDs and the Cluster Roles YAML to the `manifests` folder by taking them from the `install/cluster-operator` folder (within the Strimzi repo).
147+
* copy the CRDs, the Cluster Roles YAML (excluding the `strimzi-cluster-operator` roles) and the operator `ConfigMap` to the `manifests` folder by taking them from the `install/cluster-operator` folder (within the Strimzi repo).
148148
* take the `strimzi-cluster-operator.v<VERSION>.clusterserviceversion.yaml` CSV file (by using the new release as `<VERSION>`) in order to update the following:
149-
* `createAt` field with date/time creation of the current CSV file.
150-
* `metadata.annotations.alm-examples-metadata` section by using the examples from the `examples` folder (within the Strimzi repo).
149+
* `alm-examples-metadata` and `alm-examples` sections by using the examples from the `examples` folder (within the Strimzi repo).
151150
* `containerImage` field with the new operator image (using the SHA).
151+
* `createdAt` field with date/time creation of the current CSV file.
152152
* `name` field by setting the new version in the operator name.
153153
* `customresourcedefinitions.owned` section with the CRDs descriptions, from the `install/cluster-operator` folder (within the Strimzi repo).
154154
* `description` section with all the Strimzi operator information already used for the release on GitHub.
@@ -180,7 +180,7 @@ In this section, the following steps show how to:
180180
Prerequisites:
181181

182182
* [opm](https://github.com/operator-framework/operator-registry/releases) tool.
183-
* docker, podman or buildah (the following steps will use docker as an example)
183+
* docker, podman or buildah (the following steps allow you to configure the one to use via the `DOCKER_CMD` env var)
184184

185185
*Note*
186186
For further details about the following steps, you can also refer to the official [Operator Lifecycle Manager documentation](https://olm.operatorframework.io/docs/tasks/).
@@ -193,7 +193,8 @@ Inside the bundle directory (i.e. `operators/strimzi-kafka-operator/0.45.0`), ex
193193
```shell
194194
export OPERATOR_VERSION=0.45.0
195195
export DOCKER_REGISTRY=quay.io
196-
export DOCKER_USER=ppatierno
196+
export DOCKER_ORG=ppatierno
197+
export DOCKER_CMD=docker
197198
```
198199

199200
Run the following command in order to generate a `bundle.Dockerfile` representing the operator bundle image.
@@ -224,14 +225,14 @@ COPY metadata /metadata/
224225
Run the following command to build the operator bundle image and push it to a repository:
225226

226227
```shell
227-
docker build -t $DOCKER_REGISTRY/$DOCKER_USER/strimzi-kafka-operator-bundle:$OPERATOR_VERSION -f bundle.Dockerfile .
228-
docker push $DOCKER_REGISTRY/$DOCKER_USER/strimzi-kafka-operator-bundle:$OPERATOR_VERSION
228+
$DOCKER_CMD build -t $DOCKER_REGISTRY/$DOCKER_ORG/strimzi-kafka-operator-bundle:$OPERATOR_VERSION -f bundle.Dockerfile .
229+
$DOCKER_CMD push $DOCKER_REGISTRY/$DOCKER_ORG/strimzi-kafka-operator-bundle:$OPERATOR_VERSION
229230
```
230231

231232
You can also run some validations to ensure that your bundle is valid and in the correct format.:
232233

233234
```shell
234-
opm alpha bundle validate --tag $DOCKER_REGISTRY/$DOCKER_USER/strimzi-kafka-operator-bundle:$OPERATOR_VERSION --image-builder docker
235+
opm alpha bundle validate --tag $DOCKER_REGISTRY/$DOCKER_ORG/strimzi-kafka-operator-bundle:$OPERATOR_VERSION --image-builder $DOCKER_CMD
235236
```
236237

237238
#### Create the catalog image
@@ -258,7 +259,7 @@ opm init strimzi-kafka-operator --default-channel=stable --output yaml > strimzi
258259
Add the bundle to the catalog (repeat for each operator version/bundle you want to add in order to be able to test operator upgrades):
259260

260261
```shell
261-
opm render $DOCKER_REGISTRY/$DOCKER_USER/strimzi-kafka-operator-bundle:$OPERATOR_VERSION --output=yaml >> strimzi-catalog/index.yaml
262+
opm render $DOCKER_REGISTRY/$DOCKER_ORG/strimzi-kafka-operator-bundle:$OPERATOR_VERSION --output=yaml >> strimzi-catalog/index.yaml
262263
```
263264

264265
Edit the `index.yaml` to add the bundle to a channel (i.e. using the stable one):
@@ -290,8 +291,8 @@ entries:
290291
Build and push the catalog image:
291292
292293
```shell
293-
docker build -f strimzi-catalog.Dockerfile -t $DOCKER_REGISTRY/$DOCKER_USER/olm-catalog:latest .
294-
docker push $DOCKER_REGISTRY/$DOCKER_USER/olm-catalog:latest
294+
$DOCKER_CMD build -f strimzi-catalog.Dockerfile -t $DOCKER_REGISTRY/$DOCKER_ORG/olm-catalog:latest .
295+
$DOCKER_CMD push $DOCKER_REGISTRY/$DOCKER_ORG/olm-catalog:latest
295296
```
296297

297298
### Make the catalog available on cluster
@@ -320,7 +321,7 @@ kubectl get packagemanifest -n olm | grep strimzi-kafka-operator
320321

321322
You can test operator upgrades by starting from an existing catalog and then building a new catalog with a new operator version/bundle.
322323
In this case, the new catalog image is pulled by Kubernetes/OpenShift.
323-
It happens automatically if you are using a specific tag for the catalog image, for example going from `$DOCKER_REGISTRY/$DOCKER_USER/olm-catalog:1.0` to `$DOCKER_REGISTRY/$DOCKER_USER/olm-catalog:1.1`.
324+
It happens automatically if you are using a specific tag for the catalog image, for example going from `$DOCKER_REGISTRY/$DOCKER_ORG/olm-catalog:1.0` to `$DOCKER_REGISTRY/$DOCKER_ORG/olm-catalog:1.1`.
324325
If you are using the `latest` tag instead, you have to force pulling the new catalog image and one way is to kill the pod running the catalog.
325326

326327
```shell

0 commit comments

Comments
 (0)