feat: Migrate from manifest v0 to v1 format - #1239
Conversation
Signed-off-by: Oliver Gondža <ogondza@gmail.com>
Signed-off-by: Oliver Gondža <ogondza@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe build now validates OLM v1 bundles, constructs file-based catalogs with OPM v1.72.0, rejects deprecated catalog formats, updates bundle metadata and channels, removes the plugin container image, and ignores generated catalog artifacts. ChangesOLM v1 build and catalog migration
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Makefile
participant opm
participant CONTAINER_RUNTIME
Makefile->>opm: Initialize and render file-based catalog
Makefile->>opm: Validate catalog and generate Dockerfile
Makefile->>CONTAINER_RUNTIME: Build CATALOG_IMG
Makefile->>CONTAINER_RUNTIME: Push CATALOG_IMG
Makefile->>CONTAINER_RUNTIME: Inspect catalog image
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Makefile`:
- Line 280: Update the image inspection check in the Makefile to grep for the
operators.operatorframework.io.bundle.mediatype.v1 label and assert its
registry+v1 value, replacing the current test.mediatype.v1 check so the gate
validates the bundle media type.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 06dee4f6-c341-4b6c-a565-ce25118ff839
📒 Files selected for processing (4)
.gitignoreContainerfile.pluginMakefilebundle/bundle.Dockerfile
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
argoproj-labs/argocd-operator(manual)
💤 Files with no reviewable changes (1)
- bundle/bundle.Dockerfile
Signed-off-by: Oliver Gondža <ogondza@gmail.com>
|
/retest |
Signed-off-by: Oliver Gondža <ogondza@gmail.com>
Signed-off-by: Oliver Gondža <ogondza@gmail.com>
Signed-off-by: Oliver Gondža <ogondza@gmail.com>
|
/retest |
Signed-off-by: Oliver Gondža <ogondza@gmail.com>
svghadi
left a comment
There was a problem hiding this comment.
I have a question regarding backward compatibility. Can the new bundle and catalog images containing OLM v1 changes be used to install the operator on OLM v0 clusters, or do we need to publish separate images for OLM v0 and OLM v1?
| LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 | ||
| LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ | ||
| LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ | ||
| LABEL operators.operatorframework.io.bundle.package.v1=openshift-gitops-operator |
There was a problem hiding this comment.
We should preserve this name. In downstream we use openshift-gitops-operator
https://github.com/rh-gitops-midstream/release/blob/1e290203760532335b3d5bfcfc3919ee92a678ad/containers/gitops-operator-bundle/Dockerfile#L7
There was a problem hiding this comment.
Based on your comment, I tried to get it aligned with production build, but the prefix makes the computed name+version too long for the 33-ish character limit, that was surprisingly hard to workaround.
The make olm-deploy and the manual procedure we had before, was using the other "bundle.Dockerfile" with gitops-operator as a package name. So this does not change how the developers deploy the operator. I suggest keeping this as is, because a) it worked this way for years, and b) it is not used for other purposed than temporary deploying during development.
Signed-off-by: Oliver Gondža <ogondza@gmail.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@bundle.Dockerfile`:
- Line 8: Align the bundle channel metadata across the Docker label,
bundle/metadata/annotations.yaml, and the Makefile CHANNELS input: either
consistently retain both latest and gitops-1.8 or consistently remove gitops-1.8
from all three sources. Ensure generated bundle metadata and catalog validation
use the same channel set.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: db3eeb74-ba64-4afb-8f51-5c4ead962eed
📒 Files selected for processing (4)
Containerfile.pluginMakefilebundle.Dockerfilebundle/bundle.Dockerfile
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
argoproj-labs/argocd-operator(manual)
💤 Files with no reviewable changes (1)
- Containerfile.plugin
🚧 Files skipped from review as they are similar to previous changes (2)
- bundle/bundle.Dockerfile
- Makefile
Signed-off-by: Oliver Gondža <ogondza@gmail.com>
…into bump-opm Signed-off-by: Oliver Gondža <ogondza@gmail.com>
As discussed offline, OCP 4.18 is the first release where OLMv1 is GA. So there will be problems installing this on older ones, where OLMv1 is a Tech Preview. However, latest gitops-operators depends on 4.18+, so there is no need to support both OLM versions, provided we do not backport this change. |
This reverts commit 435aa84. Signed-off-by: Oliver Gondža <ogondza@gmail.com>
…into bump-opm Signed-off-by: Oliver Gondža <ogondza@gmail.com>
|
/retest |
|
/test v4.19-kuttl-sequential |
|
/test v4.14-kuttl-sequential |
|
@svghadi, can you please take a look? |
|
/test v4.14-kuttl-sequential |
What type of PR is this?
What does this PR do / why we need it:
Avoid using the OLMv1 and move towards OLMv2.
Co-authored-by: Cursor
Have you updated the necessary documentation?
Which issue(s) this PR fixes:
https://redhat.atlassian.net/browse/GITOPS-10517
https://redhat.atlassian.net/browse/GITOPS-10516
Test acceptance criteria:
How to test changes / Special notes to the reviewer: