-
Notifications
You must be signed in to change notification settings - Fork 249
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
render: support rendering FBC from bundle directories #748
render: support rendering FBC from bundle directories #748
Conversation
1ab84df
to
a413d20
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #748 +/- ##
==========================================
+ Coverage 53.80% 53.88% +0.08%
==========================================
Files 108 108
Lines 10368 10436 +68
==========================================
+ Hits 5578 5623 +45
- Misses 3808 3823 +15
- Partials 982 990 +8 ☔ View full report in Codecov by Sentry. |
/hold |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: joelanford The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
fc6a682
to
558f9ed
Compare
558f9ed
to
e08b50f
Compare
e08b50f
to
2f2e8c4
Compare
2f2e8c4
to
40436e0
Compare
40436e0
to
2d99bbd
Compare
…ries In order to generate expected olm.bundles, this commit also adds a new --image-ref-template flag to the `render` subcommand, which callers can use to generate image references from source data based on package name, bundle name, and bundle version. Signed-off-by: Joe Lanford <[email protected]>
2d99bbd
to
e6f8920
Compare
/lgtm |
…ha flags and usage) Signed-off-by: Joe Lanford <[email protected]>
a7a0196
to
8b20b15
Compare
/lgtm |
a21f962
into
operator-framework:master
Description of the change:
This PR adds support to the
opm render
command for bundle directories.When rendering bundle directories, there is no metadata about the bundle image reference, so the FBC rendered from a bundle directory contains inlined
olm.bundle.object
properties but lacks animage
value.However callers of
opm render
with bundle directories will generally know the image that will contain the bundle directory, so they can insert the bundle image reference themselves. To facilitate this image reference injection, this PR adds a--image-ref-template
flag that supports templating based on package, name, and version of the bundle.If specified,
render
will populateolm.bundle
objects' image field with the templated value and use theolm.csv.metadata
property. If not specified,render
will leave the image field empty and will instead include all of the bundle manifests in the catalog asolm.bundle.object
properties.Motivation for the change:
Some catalog pipelines build the bundle images based on the bundle sources that are included in a source repository. This structure works well in imperative flows where bundle sources alone are sufficient to construct a valid catalog.
However with catalogs themselves now being declarative, a new use case has appeared. Operator authors would like to be able to provide the pipeline with their bundle sources and their catalog metadata. But there is a chicken and egg problem because existing
opm
tooling only supports generating catalog metadata from a bundle image. If a pipeline builds the bundle images andopm
expects the bundle images to exist in order to generate catalog metadata, it is impossible for an operator author to provide catalog and bundle sources at the same time.In order to fully support this style of pipeline, a follow-on PR may be necessary to update
opm
's template to support using bundle directory references and supplying an image reference template.Reviewer Checklist
/docs