Skip to content

Refactor olm #1895

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Refactor olm #1895

wants to merge 8 commits into from

Conversation

Zerpet
Copy link
Member

@Zerpet Zerpet commented Jun 20, 2025

Summary Of Changes

  • Refactor process to generate OLM bundle
  • Refactor OLM workflow in Actions

Additional Context

Historically, the OLM bundle generation scripts and templates lived in a dedicated repo. To my judgement, because we are not checking in the manifests generated, it's unnecessary to keep the templates in a different repository.

This refactor also removes the Python dependency, and relies purely on Make and shell scripts to generate the manifests. This is a logical step because we are proficient with Carvel YTT, which is an excellent tool to manipulate and template YAML. Adopting Carvel also allows to setup an image promotion workflow. The refactor now builds bundles to an "untested" registry, runs tests on the image, if the tests are successful, then relocates the image to the "production" registry. This helps to keep the production registry lean, easy to navigate and understand.

Important: the jobs that open a PR have the --dry-run option for now, because I haven't been able to validate these commands. I will validate after merge

Local Testing

It is possible to test the workflow locally using nektos/act, but it requires setting the secrets and variables manually.

The new makefile can be tested using some variables, to avoid using the "production" defaults.

make -f olm.mk all docker-build docker-push catalog-all \
  BUNDLE_VERSION=2.13.0 \
  QUAY_IO_OPERATOR_IMAGE=quay.io/rabbitmqoperator/cluster-operator:2.13.0 \
  IMAGE=zerpet/test-bundle:2.13.0 \
  CATALOG_IMAGE=zerpet/test-catalog:latest

Creating an account on quay registry is free. Alternatively, it is also possible to use dockerhub for testing purposes, however, that requires setting the REGISTRY=docker.io make variable.

Zerpet added 8 commits June 17, 2025 17:10
OLM is specific enough
A custom catalog will be used to test in CI. CI will test that a bundle
is deployable and upgradeable.
This is the lowest version we run tests on.
The environment we were using to test the OLM bundle is long gone.
Instead, we are going to deploy a KinD environment, install OLM, and
test that our bundle installs. This test includes creating a
subscription, creating a rabbitmq object and verifying that images have
"rabbitmq" in the name. It is naive, but this workflow can be extended
to run operator system tests.
@Zerpet
Copy link
Member Author

Zerpet commented Jun 20, 2025

@mkuratczyk @MirahImage @PujaVad tagging you in case your fancy a review 🙂 I know you don't have much context on operatorhub or OLM, but any feedback is welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant