-
Story
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
None
The current method of building the File-Based Catalog (FBC) using the generate-fbc.sh script should be replaced by a new task by Konflux run-opm-command task within the fbc-builder Konflux pipeline.
This new task simplifies the process by building the catalog.json directly from the catalog-template.yaml during the pipeline run. This means the pre-generated catalogs directory is no longer needed and can be deleted. This change is recommended for better automation and maintenance.
Key Points:
-
- Create catalog-template.yamls per application/package/operator as follows
opm alpha convert-template basic catalogs-rhwa-25-9/v420/catalog/self-node-remediation/catalog.yaml > catalog/4.21-0/snr-basic-catalog-template.json
- Create catalog-template.yamls per application/package/operator as follows
-
- Modify the template using Catalog Update Formulary logic (maybe inside a new script to simplify usage).
- Avoid using generate-fbc.sh in favor of the run-opm-command task from the PipelineRun.
Catalogs are built on-demand, and the catalogs directory will be removed.
The task only handles one package at a time. If you have multiple packages, you'll need to run the task for each one.
This is a big problem for using this initiative. We can probably use Matrix or run it multiple times...
Definition of Done:
- New catalog templates are created
- The FBC build succeeds with the new run-opm-command task.
- The generate-fbc.sh script and catalogs directory are removed.
References
- Building a File-Based Catalog from catalog template (with example) - https://github.com/konflux-ci/olm-operator-konflux-sample/blob/main/docs/konflux-building-catalog.md
- catalog template (KONFLUX-5311, and Slack)
- building-a-file-based-catalog - https://github.com/konflux-ci/olm-operator-konflux-sample/blob/main/docs/konflux-onboarding.md#building-a-file-based-catalog
- Catalog Templates - https://olm.operatorframework.io/docs/reference/catalog-templates/
- opm tasks -
- run-opm-command-oci-ta - https://github.com/konflux-ci/build-definitions/tree/main/task/run-opm-command-oci-ta/0.1
- opm-get-bundle-version - https://github.com/konflux-ci/build-definitions/tree/main/task/opm-get-bundle-version/0.1
- opm-render-bundles - https://github.com/konflux-ci/build-definitions/tree/main/task/opm-render-bundles/0.1
- opm render feature for image references in specific OLM catalog paths are converted from tag format (image:tag) to digest format (image@sha256:...) for .image and .relatedImages[].image https://github.com/konflux-ci/build-definitions/pull/3075
- is triggered by
-
RHWA-190 Improve FBC Catalog Creation & Maintainability Script & Create Catalog Templates
-
- Closed
-