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 |
Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com> Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
|
/agentic_review |
…-build-tooling-to-produce-olm-v-1-compatible-fbc-catalogs
|
/build-images |
|
✅ PR images built successfully! Images are available for testing:
Also available with PR number tag:
Triggered by @Fortune-Ndlovu |
gazarenkov
left a comment
There was a problem hiding this comment.
May be some shoult reference for new command would make sense in docs/developer.md?
Rename deploy-openshift-auto → deploy-openshift (auto-detect becomes the default). Rename the old deploy-openshift (OLM v0 only) → deploy-openshift-olmv0. Same for undeploy-openshift-auto → undeploy-openshift. Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com> Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
Add references for deploy-openshift (auto-detect), deploy-openshift-olmv0, deploy-openshift-olmv1, and undeploy-openshift targets. Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com> 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3163 +/- ##
=======================================
Coverage 63.25% 63.25%
=======================================
Files 38 38
Lines 2316 2316
=======================================
Hits 1465 1465
Misses 706 706
Partials 145 145
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
…-build-tooling-to-produce-olm-v-1-compatible-fbc-catalogs
|
/build-images |
|
✅ PR images built successfully! Images are available for testing:
Also available with PR number tag:
Triggered by @Fortune-Ndlovu |
$ make create-operator-namespace \
IMAGE_TAG_BASE=quay.io/rhdh-community/operator \
VERSION=0.11.0-pr-3163-b2eff293 \
PROFILE=rhdh
kubectl create namespace rhdh-operator
namespace/rhdh-operator created$ make catalog-update-olmv1 deploy-olmv1 \
IMAGE_TAG_BASE=quay.io/rhdh-community/operator \
VERSION=0.11.0-pr-3163-b2eff293 \
PROFILE=rhdh
kubectl delete clustercatalog rhdh-operator --ignore-not-found
sed "s/{{CATALOG_IMG}}/quay.io\/rhdh-community\/operator-catalog:0.11.0-pr-3163-b2eff293/g" config/samples/catalog-cluster-catalog-template.yaml | \
sed "s/{{PROFILE_SHORT}}/rhdh/g" | \
kubectl apply -f -
clustercatalog.olm.operatorframework.io/rhdh-operator created
sed "s/{{BUNDLE_METADATA_PACKAGE_NAME}}/rhdh/g" config/samples/catalog-cluster-extension-template.yaml | \
sed "s/{{PROFILE_SHORT}}/rhdh/g" | \
sed "s/{{OPERATOR_NAMESPACE}}/ rhdh-operator/g" | \
kubectl apply -f -
serviceaccount/rhdh-operator-installer created
clusterrolebinding.rbac.authorization.k8s.io/rhdh-operator-installer-binding created
clusterextension.olm.operatorframework.io/rhdh-operator created$ oc get clustercatalog rhdh-operator
NAME LASTUNPACKED SERVING AGE
rhdh-operator 13s True 14s$ oc get clusterextension rhdh-operator
NAME INSTALLED BUNDLE VERSION INSTALLED PROGRESSING AGE
rhdh-operator rhdh-operator.v0.11.0-pr-3163-b2eff293 0.11.0-pr-3163-b2eff293 True True 3m24s$ oc get pods -n rhdh-operator
NAME READY STATUS RESTARTS AGE
rhdh-operator-b8c96779b-nlvd7 1/1 Running 0 24s oc get crd backstages.rhdh.redhat.com
NAME CREATED AT
backstages.rhdh.redhat.com 2026-07-16T16:39:14Z$ cat <<'EOF' | oc apply -f -
apiVersion: rhdh.redhat.com/v1alpha5
kind: Backstage
metadata:
name: fbc-test
namespace: rhdh-operator
spec:
application:
replicas: 1
database:
enableLocalDb: true
EOF
backstage.rhdh.redhat.com/fbc-test created$ oc get pods -n rhdh-operator
NAME READY STATUS RESTARTS AGE
backstage-fbc-test-78ddd8f679-fhjnh 1/1 Running 0 4m9s
backstage-psql-fbc-test-0 1/1 Running 0 4m9s
rhdh-operator-b8c96779b-nlvd7 1/1 Running 0 4m45sclean up $ make undeploy-openshift
make[1]: Entering directory '/home/fndlovu/Documents/RHIDP-14658-operator-update-build-tooling-to-produce-olm-v-1-compatible-fbc-catalogs/rhdh-operator'
kubectl delete clusterextension rhdh-operator --ignore-not-found
clusterextension.olm.operatorframework.io "rhdh-operator" deleted
kubectl delete clustercatalog rhdh-operator --ignore-not-found
clustercatalog.olm.operatorframework.io "rhdh-operator" deleted
kubectl delete clusterrolebinding rhdh-operator-installer-binding --ignore-not-found
clusterrolebinding.rbac.authorization.k8s.io "rhdh-operator-installer-binding" deleted
kubectl -n rhdh-operator delete serviceaccount rhdh-operator-installer --ignore-not-found
serviceaccount "rhdh-operator-installer" deleted from rhdh-operator namespace
make[1]: Leaving directory '/home/fndlovu/Documents/RHIDP-14658-operator-update-build-tooling-to-produce-olm-v-1-compatible-fbc-catalogs/rhdh-operator'
$ oc get pods -n rhdh-operator
No resources found in rhdh-operator namespace. |
…t-olmv1 targets deploy-openshift auto-detects OLM version, making the explicit v0/v1 convenience targets unnecessary. The lower-level targets (deploy-olmv1, deploy-olm-openshift, catalog-update-olmv1, catalog-update-openshift) remain available for direct use. Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com> Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
Set CONTAINERS_REGISTRIES_CONF conditionally before a single opm render call instead of duplicating the call in both branches. Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com> 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 |
|
images also work |
5a9175b
into
redhat-developer:main






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.
For example:
Wait about 30 seconds for OLM v1 to reconcile, then run each check:
# Should show Serving: True oc get clustercatalog rhdh-operator# Should show Installed: True (may take up to 60s) oc get clusterextension rhdh-operator# Operator pod should be Running oc get pods -n rhdh-operator# CRD should exist oc get crd backstages.rhdh.redhat.comsmoke test
oc wait --for=condition=Available deployment/backstage-fbc-test -n rhdh-operator --timeout=600s oc get pods -n rhdh-operator