chore: replace SQLite catalog-build with FBC workflow and add OLM v1 deploy targets [RHIDP-14669]#3163
Conversation
The FBC catalog directory (catalog-fbc/) is generated at build time by the new FBC workflow and should not be committed. Replace the old index.Dockerfile entry which was generated by the deprecated opm index add command. Ref: RHIDP-14669 Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com> Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
These variables were only used by the deprecated opm index add command to support incremental catalog builds from a base index image. The FBC workflow builds a fresh catalog each time, which is the standard FBC pattern. Removing these unused variables to prepare for the FBC catalog-build target. Ref: RHIDP-14669 Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com> Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
Replace the deprecated opm index add (SQLite) catalog-build target with an FBC workflow using opm init + opm render. The new target produces a catalog image with the index.configs.v1 label required by OLM v1, while remaining backward-compatible with OLM v0 on OCP 4.17+. Ref: RHIDP-14669 Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com> Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
Add template YAML files for OLM v1 deployment: - catalog-cluster-catalog-template.yaml: ClusterCatalog resource - catalog-cluster-extension-template.yaml: ServiceAccount, ClusterRoleBinding, and ClusterExtension resources These mirror the existing OLM v0 templates (catalog-source-template, catalog-subscription-template, catalog-operator-group) for use with the new deploy-olmv1 Makefile targets. Ref: RHIDP-14658 Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com> Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
Add Makefile targets for OLM v1 deployment: - deploy-olmv1: applies ClusterExtension, ServiceAccount, and ClusterRoleBinding - undeploy-olmv1: removes OLM v1 resources - catalog-update-olmv1: creates/updates ClusterCatalog - deploy-openshift-olmv1: end-to-end build + deploy with OLM v1 These parallel the existing OLM v0 targets (deploy-olm, undeploy-olm, catalog-update, deploy-openshift). Ref: RHIDP-14658 Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com> Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
Auto-detects OLM v1 by checking for the ClusterExtension CRD and uses the appropriate deploy path (v0 or v1). Ref: RHIDP-14669 Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com> Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
The ServiceAccount needs an explicit namespace in its metadata, otherwise kubectl apply creates it in the default namespace instead of the operator namespace. Ref: RHIDP-14669 Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com> Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
|
/agentic_review |
Code Review by Qodo
Context used✅ Compliance rules (platform):
18 rules 1. Template binds cluster-admin
|
Consistent with catalog-update-olmv1 which already uses this flag. Prevents noisy errors when resources don't exist during teardown. Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com>
OLM v1 requires cluster-admin for installer ServiceAccounts that manage cluster-scoped resources. Adding a comment to preempt security review flags. Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com>
The FBC channel entry is generated for a single bundle. Document this so future multi-bundle usage knows to extend the channel entries accordingly. Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com>
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit 7c82fe2 |
|
/build-images |
|
❌ Image build failed See workflow run for details: https://github.com/redhat-developer/rhdh-operator/actions/runs/28975714753 Triggered by @Fortune-Ndlovu |
opm render uses Go's containers/image library which requires registries.conf in v2 format. Ubuntu's podman package from apt ships v1 format, causing catalog-build to fail in CI. Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com>
|
/build-images |
|
❌ Image build failed See workflow run for details: https://github.com/redhat-developer/rhdh-operator/actions/runs/28977474121 Triggered by @Fortune-Ndlovu |
This reverts commit 461f179.
opm render uses Go's containers/image library which requires registries.conf in v2 format. Ubuntu's apt podman package ships v1 format, breaking catalog-build in CI. Detect v1 format and override with a minimal v2 config via CONTAINERS_REGISTRIES_CONF. Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com>
|
/build-images |
|
❌ Image build failed See workflow run for details: https://github.com/redhat-developer/rhdh-operator/actions/runs/28977899910 Triggered by @Fortune-Ndlovu |
opm validate parses every file in the catalog-fbc directory. The registries.conf workaround file was being treated as FBC content, causing a JSON unmarshal error during validation. Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com>
|
/build-images |
|
|
✅ PR images built successfully! Images are available for testing:
Also available with PR number tag:
Triggered by @Fortune-Ndlovu |
| catalog-build: bundle-push opm ## Build an FBC catalog image from the operator-bundle image | ||
| rm -rf catalog-fbc && mkdir -p catalog-fbc | ||
| $(OPM) init $(BUNDLE_METADATA_PACKAGE_NAME) --default-channel=$(DEFAULT_CHANNEL) --output yaml > catalog-fbc/catalog.yaml | ||
| @if [ -f /etc/containers/registries.conf ] && grep -q '^\[registries' /etc/containers/registries.conf 2>/dev/null; then \ |
There was a problem hiding this comment.
May be consider "if logic" to move to ./hack/ script to keep Makefile a bit lighter?




Description
This PR replaces the deprecated
opm index add(SQLite) catalog-build target with an FBC workflow usingopm init+opm render, and adds OLM v1 deploy/undeploy Makefile targets with ClusterCatalog and ClusterExtension templates. OLM v1's catalogd rejects SQLite catalogs missing theoperators.operatorframework.io.index.configs.v1label. FBC catalogs remain backward-compatible with OLM v0 on OCP 4.17+.Which issue(s) does this PR fix or relate to
PR acceptance criteria
How to test changes / Special notes to the reviewer
see: https://redhat.atlassian.net/browse/RHIDP-14669?focusedCommentId=17531594
Building Container Images for Testing
Need to test container images from this PR?
For Maintainers: To trigger a test image build, review the code and comment
/build-images.This always builds the HEAD of the PR branch.
For Contributors: Ask a maintainer to run
/build-images.Images will be built and pushed to Quay with links posted in comments.