This repository is for building and releasing the ACS operator indexes on Konflux.
It's for updating Operator Catalogs, i.e., so OpenShift clusters can see new versions of ACS operator in their
OperatorHub.
If some pipeline failed, you can restart it by commenting in the PR /test <pipeline-name> (e.g. /test operator-index-ocp-v4-16-on-push).
See more in our docs.
- Open
bundles.yamlfile. - Add a new operator bundle image with version. It would look like this:
- image: quay.io/rhacs-eng/release-operator-bundle@sha256:c82e8330c257e56eb43cb5fa7b0c842a7f7f0414e32e26a792ef36817cb5ca02 version: 4.7.9
- Note that the image must be referenced by digest, not by tag.
- Keep entries sorted by version.
- You may add bundle images from
quay.io,brew.registry.redhat.ioand so on (provided they exist and are pullable) during development and/or when preparing to release.
Ultimately, all released bundle images must come fromregistry.redhat.io/advanced-cluster-security/rhacs-operator-bundlerepo because this is where customers expect to find them. There's a CI check which should make it impossible to push tomasterif there's any bundle from a different repo.
- Update
oldest_supported_versionvalue:- Check
Life Cycle Datestable in Red Hat Advanced Cluster Security for Kubernetes Support Policy. - Set
oldest_supported_versionto be the oldest Y-Stream version still in support according to that table, including Maintenance Support. Patch number should always be.0. For example, if 4.6 is the oldest in support (maintenance phase), setoldest_supported_version: 4.6.0.
- Check
- Update catalogs (follow updating catalogs steps)
- Open a PR with
Add 4.Y.Z versiontitle.
Run
make clean && make valid-catalogs
Note: this will take a while.
If a new bundle was added then you should see that catalog-template.yaml, 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 <stage|prod>. Usestagefor test release andprodfor production one. - (Skip for
stagerelease.) Create a PR which adds the file created by the script, get the PR reviewed and merged. - (Skip for
stagerelease.) 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/<YYYYMMDD>-<stage|prod>-<SHA>.yaml - Monitor release using monitor release script. Each supported OCP version has its own
Release. Successfully finishedReleasehasSucceededstatus. - Follow the restarting release step below if any of the
Releases fails for any OCP version. - (Skip for
stagerelease.) 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-XXKonflux application for OCP version you want to restart (XXmeans minor part of the OCP version). - Select
Releasestab. - 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
Releasefive times or more, open a high severity request in #konflux-users Slack channel describing the problem and providing names/links to Release CRs.
