feat: add ocm component for zot#73
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdds OCM packaging for zot: a component manifest with Helm chart and OCI images, a values template that resolves image references from OCIResources, a README documenting the layout, and a Flux chart version bump to 2.18.3. Changeszot OCM Packaging
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 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 `@zot/README.md`:
- Around line 27-34: Update the example invocations of the ocm CLI in the README
where the command "ocm transfer ctf" is shown: replace the incorrect flag
"--copy-local-resources" with the correct "--copy-resources" so the examples
(both the ghcr.io and localhost:5001 cases) will actually copy resources and
rewrite image references; ensure both occurrences in the "ocm transfer ctf"
examples are updated and the explanatory sentence about rewriting image
references still matches the corrected flag name.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3c5fdaf7-31c2-4c53-8ee2-4b5766e562b4
📒 Files selected for processing (3)
zot/README.mdzot/component-constructor.yamlzot/values.yaml.tpl
9b2179d to
63a410d
Compare
|
|
||
| - name: alpine-image | ||
| type: ociImage | ||
| version: v3.18 |
There was a problem hiding this comment.
🧐 I guess the v is obsolete.
There was a problem hiding this comment.
good point, for some reason i had issues leaving it out and thought ocm required versions to start with v
There was a problem hiding this comment.
♻️ Duplicate comments (1)
zot/component-constructor.yaml (1)
32-38:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winVersion format is inconsistent with the rest of the file.
Line 34 uses an unquoted version string with a
vprefix (v2.1.17), while all other version fields in this file use quoted strings without thevprefix (e.g.,"0.1.116","3.18"). For consistency and to align with established patterns in this codebase, quote the version and consider removing thevprefix.🔧 Proposed fix
- name: zot-image type: ociImage - version: v2.1.17 + version: "2.1.17" relation: external access: type: ociArtifact - imageReference: ghcr.io/project-zot/zot:v2.1.17 + imageReference: ghcr.io/project-zot/zot:2.1.17🤖 Prompt for 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. In `@zot/component-constructor.yaml` around lines 32 - 38, Update the zot-image component's version field to match the project's version format by quoting the version string and removing the leading "v" (i.e., change the unquoted v-prefixed value in the version key for component name "zot-image" to a quoted numeric string like "2.1.17"), and make the corresponding change in access.imageReference so the tag there also uses the same non‑v, quoted version (e.g., ghcr.io/project-zot/zot:2.1.17) to keep fields consistent.
🧹 Nitpick comments (1)
zot/values.yaml.tpl (1)
1-10: ⚡ Quick winConsider quoting both tags for consistency and robustness.
Line 4 emits the zot tag unquoted, while line 10 quotes the alpine tag. The alpine tag must be quoted to prevent YAML parsers from treating
3.18as a float. The zot tag (v2.1.17) doesn't strictly require quotes because it starts with a letter, but quoting both creates consistency and future-proofs the template against version format changes (e.g., if the zot version were changed to a numeric format like2.1.17, the unquoted template would become fragile).♻️ Proposed refactor for consistency
{{- $zot := index .OCIResources "zot-image" }} image: repository: {{ $zot.Host }}/{{ $zot.Repository }} - tag: {{ $zot.Tag }} + tag: "{{ $zot.Tag }}" {{- $alpine := index .OCIResources "alpine-image" }} test: image: repository: {{ $alpine.Host }}/{{ $alpine.Repository }} tag: "{{ $alpine.Tag }}"🤖 Prompt for 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. In `@zot/values.yaml.tpl` around lines 1 - 10, The zot image tag is unquoted while the alpine tag is quoted; update the template to quote the zot tag for consistency and YAML safety by changing the tag interpolation for the $zot image (the line that renders {{ $zot.Tag }}) to use a quoted form similar to the alpine tag so both image tags are emitted as strings.
🤖 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.
Duplicate comments:
In `@zot/component-constructor.yaml`:
- Around line 32-38: Update the zot-image component's version field to match the
project's version format by quoting the version string and removing the leading
"v" (i.e., change the unquoted v-prefixed value in the version key for component
name "zot-image" to a quoted numeric string like "2.1.17"), and make the
corresponding change in access.imageReference so the tag there also uses the
same non‑v, quoted version (e.g., ghcr.io/project-zot/zot:2.1.17) to keep fields
consistent.
---
Nitpick comments:
In `@zot/values.yaml.tpl`:
- Around line 1-10: The zot image tag is unquoted while the alpine tag is
quoted; update the template to quote the zot tag for consistency and YAML safety
by changing the tag interpolation for the $zot image (the line that renders {{
$zot.Tag }}) to use a quoted form similar to the alpine tag so both image tags
are emitted as strings.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 533c62c4-f31f-4fb0-88ff-f2cac315de72
📒 Files selected for processing (4)
flux/component-constructor.yamlzot/README.mdzot/component-constructor.yamlzot/values.yaml.tpl
✅ Files skipped from review due to trivial changes (2)
- flux/component-constructor.yaml
- zot/README.md
00b49aa to
fbaba05
Compare
What
Add OCM component for zot.
Why
To enable teams to host their own instances of zot.
Testing
Notes for reviewers
Checklist
Summary by CodeRabbit
Documentation
Configuration