This repository is for building the ACS (downstream) operator indexes on Konflux.
Comment in the PR /test <job_name>
(e.g. /test operator-index-ocp-v4-16-on-push
).
See more in our docs.
- Open
catalog-template.yaml
file - Find the
stable
channel block. It starts with:
- schema: olm.channel
name: stable
-
Insert a new entry to the
entries
list.- Note: Keep entries sorted by version (e.g.
4.9.1
should be before4.9.2
)
The entry should look like this:
- &bundle-4-Y-Z name: rhacs-operator.v4.Y.Z replaces: rhacs-operator.v4.PREVIOUS_Y.PREVIOUS_Z skipRange: '>= 4.PREVIOUS_CHANNEL_Y.0 < 4.Y.Z'
Replace
Y
,Z
,PREVIOUS_Y
,PREVIOUS_Z
,PREVIOUS_CHANNEL_Y
accordingly.Y
is the minor component of the version (e.g. for 4.9.1Y
equals to 9)Z
is the patch component of the version (e.g. for 4.9.1Z
equals to 1)PREVIOUS_Y
is the minor component of the previous version (e.g. the previous version for 4.5.3 is 4.5.2 soPREVIOUS_Y
equals to 5. For 4.3.0PREVIOUS_Y
is equal to 2)PREVIOUS_Z
is the minor component of the previous version (e.g. the previous version for 4.5.3 is 4.5.2 soPREVIOUS_Z
equals to 2. For 4.3.0PREVIOUS_Z
is equal to 5 because the previous version is 4.2.5)PREVIOUS_CHANNEL_Y
is the minor component of the previous channel version (e.g. for 4.6.3 the previous channel is 4.5 soPREVIOUS_CHANNEL_Y
is equal to 4)
- Note: Add an empty line after the last entry if you add a new Y version with Z equals to 0 (e.g. 4.9.0). It helps visually separate different Y version in the list.
- Note: Keep entries sorted by version (e.g.
-
(For new Y version only where Z is equal to 0) Create a new channel block:
- schema: olm.channel name: rhacs-4.Y package: rhacs-operator entries:
Replace
Y
accordingly. Keep the channel blocks sorted in ascending order (e.g. 4.6 goes after 4.5). -
Find a channel block for your Y version and insert a new entry to the
entries
list. Use the yaml anchor declared on the 3d step (starts with&
):- schema: olm.channel name: rhacs-4.Y package: rhacs-operator entries: - *bundle-4-Y-Z
Replace
Y
andZ
accordingly. -
Add a new block with operator bundle image for this version to the list:
- schema: olm.bundle # 4.Y.Z image: OPERATOR_BUNDLE_REGISTRY@OPERATOR_BUNDLE_SHA256
Replace
Y
,Z
accordingly.OPERATOR_BUNDLE_REGISTRY
set toregistry.redhat.io/advanced-cluster-security/rhacs-operator-bundle
for ready to release version. Usebrew.registry.redhat.io/rh-osbs/rhacs-operator-bundle
for release candidates.OPERATOR_BUNDLE_SHA256
the operator bundle SHA starts withsha256:
. In order to fetch SHA find an email[CVP] (SUCCESS) cvp-redhatadvancedclustersecurity: rhacs-operator-bundle-container-4.Y.Z-x
subject. OpenBrew Build Info
link and find the digest of theregistry-proxy.engineering.redhat.com/rh-osbs/rhacs-operator-bundle
image. Use the digest value for theOPERATOR_BUNDLE_SHA256
.
-
Update catalogs (follow updating catalogs steps)
-
open a PR with
Add 4.Y.Z version
title
Run
make clean && make valid-catalogs
Note: this will take a while.
If a new bundle was added then you should see that catalog-bundle-object/rhacs-operator/catalog.json
and catalog-csv-metadata/rhacs-operator/catalog.json
files are changed.
The following documentation was used for setting up catalogs update (this and this).
Run ./scripts/get-built-images.sh [COMMIT]
to fetch built operator catalog images for the provided COMMIT
for each supported OCP version.
Note: The script uses current branch commit if no COMMIT
argument provided.
This directory contains two versions of the catalog, in subdirectories catalog-bundle-object
and catalog-csv-metadata
.
The former is expected by OpenShift versions up to and including 4.16, and the latter - by 4.17 and later.
See konflux docs.
- Make sure you logged in to the Konflux cluster.
- Make sure you checked out the latest master branch:
git checkout master && git pull
- Generate Release and Snapshot CRs by running
./scripts/generate-releases.sh <staging|prod>
. Usestaging
for test release andprod
for production one. - (Skip for
staging
release.) Create a PR which adds the file created by the script, get the PR reviewed and merged. - (Skip for
staging
release.) Go to the #acs-operator-index-release channel, and:- make sure the previous operator index release is complete (has a green check mark emoticon)
- if not, coordinate with the person conducting that release
- once that release is complete, start a new thread for your release
- Apply generated CRs to the cluster:
oc create -f release-history/<YYYY-MM-DD>-<SHA>-<staging|prod>.yaml
- Monitor release using monitor release script. Each supported OCP version has its own
Release
. Successfully finishedRelease
hasSucceeded
status. - Follow the restarting release step below if any of the
Release
s fails for any OCP version. - (Skip for
staging
release.) Once done, go back to the Slack thread you started earlier, add a message that your release is done and add a green check mark emoticon on the initial message of the thread. - Once releases for all OCP versions successfully finish, then the operator catalog release is done. If you perform it as part of a bigger release procedure, you should go back to that procedure and continue with further steps.
Run ./scripts/monitor-release.sh [COMMIT]
to see the current status for the releases associated with the provided COMMIT
.
Note: The script uses current branch commit if no COMMIT
argument provided.
If a particular Release fails (i.e. the CRs status changes to Failed
), you should restart it until it succeeds. Failing to do so will leave corresponding OpenShift Operator catalog without updates.
- Open
acs-operator-index-ocp-v4-XX
Konflux application for OCP version you want to restart (XX
means minor part of the OCP version). - Select
Releases
tab. - Find release by name you want to restart.
- Click on the action menu (3 dots) on the right.
- Press "Re-run release" option. This creates a new Release CR.
- Monitor the new release.
- Repeat restarting release if the release keeps failing. If you find yourself re-running a given
Release
five times or more, open a high severity request in #konflux-users Slack channel describing the problem and providing names/links to Release CRs.