render: support rendering DC from packagemanifest and bundle directories
Description of the change:
This PR adds support to the opm render command for package manifest and bundle directories.
Two notes:
-
When rendering bundle directories, there is no metadata about the bundle image reference, so the declarative config rendered from a bundle directory contains inlined
olm.bundle.objectproperties but lacks animagevalue.However callers of
opm renderwith bundle directories will generally know the image that will contain the bundle directory, so they can insert the bundle image reference themselves, e.g. withjq:opm render ./my-bundle | jq '.image="quay.io/my-org/my-bundle:0.1.0"' -
Rendering a package manifest is done by loading the package into a temporary sqlite database, and then converting the database to declarative config. The consequence is that support for rendering package manifests will likely be removed when sqlite support is removed.
Motivation for the change:
Make opm render more versatile.
Reviewer Checklist
- [x] Implementation matches the proposed design, or proposal is updated to match implementation
- [x] Sufficient unit test coverage
- [ ] Sufficient end-to-end test coverage
- [ ] Docs updated or added to
/docs - [ ] Commit messages sensible and descriptive
Codecov Report
Attention: Patch coverage is 72.22222% with 20 lines in your changes are missing coverage. Please review.
Project coverage is 53.88%. Comparing base (
d74ce59) to head (8b20b15). Report is 6 commits behind head on master.
| Files | Patch % | Lines |
|---|---|---|
| alpha/action/render.go | 72.22% | 10 Missing and 10 partials :warning: |
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
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
/hold We might not need this, at least not urgently.
[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
- ~~OWNERS~~ [joelanford]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/lgtm
/lgtm