docs: add how-to for transferring Helm charts with OCM#751
Conversation
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
✅ Deploy Preview for open-component-model ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
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:
📝 WalkthroughWalkthroughAdds two words to the repository wordlist and introduces a new how-to document describing transferring Helm-chart component versions between OCI registries using the OCM CLI. Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan for PR comments
Comment |
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
6c76420 to
1c4f77b
Compare
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
57cd284 to
31790cf
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@content/docs/how-to/transfer-helm-charts.md`:
- Around line 96-106: Update the documentation block for the "As a standalone
OCI artifact" section to include a concrete Helm pull example using the
imageReference from the component descriptor: show how to map
`<registry>/<repo>:<tag>` into the Helm OCI pull syntax (e.g., use the
`imageReference` to form `oci://<registry>/<repo>/<chart-name>` and pass
`--version <tag>`), and mention that the `imageReference` comes from the
component descriptor entry for `ociArtifact` (referenced as imageReference) so
readers can directly run the command `helm pull oci://... --version ...`.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1ed6ad6c-48e5-461e-a9f0-1e29fa58e959
📒 Files selected for processing (2)
.github/config/wordlist.txtcontent/docs/how-to/transfer-helm-charts.md
|
reworking - this is confusing myself :D |
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
115a0b6 to
f40bf89
Compare
|
@coderabbitai I rewrote that thing |
|
🧠 Learnings used✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
🧹 Nitpick comments (2)
content/docs/how-to/transfer-helm-charts.md (2)
65-75: Consider briefly mentioning the--upload-as localBlobalternative.The document focuses on
--upload-as ociArtifact, which is the appropriate choice for Helm charts when they should be independently pullable. However, since the PR description indicates bothlocalBlobandociArtifactmodes were tested and commits reference clarifying the difference, a brief note about when to uselocalBlobinstead could help readers understand the trade-offs.💡 Optional: Add a brief note about storage mode alternatives
Consider adding a short note after line 75 or in the Tips section:
> **Note:** Alternatively, you can use `--upload-as localBlob` to embed the chart directly in the component descriptor's blob store. This keeps the chart tightly coupled with the component but makes it inaccessible to standard Helm CLI tools. Use `ociArtifact` (shown above) when you need the chart to be independently pullable with `helm pull`.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@content/docs/how-to/transfer-helm-charts.md` around lines 65 - 75, Add a brief note after the ociArtifact example (the `ocm transfer cv` snippet that uses `--upload-as ociArtifact`) explaining the alternative `--upload-as localBlob` mode: state that localBlob embeds the chart in the component descriptor blob store (keeps it coupled and not pullable by Helm CLI), whereas ociArtifact makes the chart independently addressable and pullable (useful for `helm pull`), so readers understand the trade-offs.
77-81: Show how to extract the imageReference from the component descriptor.Lines 77-78 mention that readers "can find the
imageReferencein the component descriptor's resource access section," but don't demonstrate how to retrieve it. Adding a brief example would make this immediately actionable.📖 Suggested addition to show imageReference extraction
Consider adding a short example after line 78 showing how to inspect the component descriptor:
You can find the `imageReference` in the component descriptor's resource access section and use it directly with Helm's OCI support: + +```bash +# Inspect the component descriptor to find the imageReference +ocm get cv <target-registry>//<component-name>:<version> -o yaml +``` + +Look for the `imageReference` field in the resource's access section. For example: + +```yaml +resources: +- name: my-chart + access: + imageReference: ghcr.io/my-org/charts/my-chart:1.0.0 + type: ociArtifact +``` + +Use this imageReference value with Helm's OCI support:This bridges the gap between "you can find it" and the actual Helm command.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@content/docs/how-to/transfer-helm-charts.md` around lines 77 - 81, Add a short, concrete example after the sentence about finding imageReference that shows how to inspect the component descriptor (use the ocm get cv command to output YAML) and point readers to the resources[].access.imageReference field, include a small YAML excerpt demonstrating resources -> access -> imageReference, and then show using that imageReference value with the existing helm pull oci://... --version ... example so readers can immediately extract and use the imageReference.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@content/docs/how-to/transfer-helm-charts.md`:
- Around line 65-75: Add a brief note after the ociArtifact example (the `ocm
transfer cv` snippet that uses `--upload-as ociArtifact`) explaining the
alternative `--upload-as localBlob` mode: state that localBlob embeds the chart
in the component descriptor blob store (keeps it coupled and not pullable by
Helm CLI), whereas ociArtifact makes the chart independently addressable and
pullable (useful for `helm pull`), so readers understand the trade-offs.
- Around line 77-81: Add a short, concrete example after the sentence about
finding imageReference that shows how to inspect the component descriptor (use
the ocm get cv command to output YAML) and point readers to the
resources[].access.imageReference field, include a small YAML excerpt
demonstrating resources -> access -> imageReference, and then show using that
imageReference value with the existing helm pull oci://... --version ... example
so readers can immediately extract and use the imageReference.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 5c40df82-7bca-47a9-9c95-7abbfaa7fae2
📒 Files selected for processing (2)
.github/config/wordlist.txtcontent/docs/how-to/transfer-helm-charts.md
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/config/wordlist.txt
jakobmoellerdev
left a comment
There was a problem hiding this comment.
mostly good, just some concerns on missing features
Skarlso
left a comment
There was a problem hiding this comment.
just a single comment, otherwise lgtm
3ea1e6c to
3ed3a23
Compare
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
3ed3a23 to
6eb398f
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@content/docs/how-to/transfer-helm-charts.md`:
- Around line 63-67: The callout explaining why the
--skip-reference-digest-processing flag is required points to the wrong tracker
(ocm-project#911); update the callout in the "{{<callout ...>}}" block that
mentions `--skip-reference-digest-processing` and `add cv` so it links to the
correct issue that specifically documents the `add cv` digest-processing
limitation (or remove the incorrect link and add a brief note that a dedicated
issue will be created), and ensure the text still states that digests are
computed later during transfer when the chart is fetched.
- Around line 47-50: The example uses a packaged filename for the helmChart key
which is invalid for the helm/v1 access method; change the example so helmChart
uses chart coordinates (either "name:version" or just "name" with version
specified separately) under the access block (the access.type helm/v1 and
helmChart key should be updated), e.g. replace "my-chart-1.0.0.tgz" with
"my-chart:1.0.0" or "my-chart" and add a separate version field if needed.
- Around line 132-139: Update the example for the ocm download command to
include the -d flag so the implicit helm/artifact download handler is used and
the OCI artifact is converted into a standard Helm chart archive; specifically
modify the shown `ocm download resource` invocation (the command that references
`<target-registry>//<component-name>:<version>` and `--identity name=my-chart
--output ./downloaded`) to add `-d` so users receive a .tgz Helm chart instead
of OCI blob layout.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3c7c3d05-9236-4f70-b3f5-b5ca9d2a4fc7
📒 Files selected for processing (2)
.github/config/wordlist.txtcontent/docs/how-to/transfer-helm-charts.md
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/config/wordlist.txt
#### What this PR does / why we need it Adds a how-to guide for transferring component versions containing Helm chart resources (`helm/v1` access type) between OCI registries using the OCM CLI. Covers the `--upload-as localBlob` and `--upload-as ociArtifact` options. Related to open-component-model/open-component-model#1846 #### Which issue(s) this PR is related to Related to open-component-model/open-component-model#1846 (comment) #### Type of content - [ ] Tutorial (`getting-started/` or `tutorials/`) - [x] How-to Guide (`how-to/`) - [ ] Explanation / Concept (`concepts/`) - [ ] Reference (`reference/`) - [ ] Other (infrastructure, config, fixes) #### Checklist - [x] I have read and followed the [Contributing Guide](https://github.com/open-component-model/ocm-website/blob/main/CONTRIBUTING.md) - [x] All commands/code snippets are tested and can be copy-pasted #### Test ```bash #!/bin/zsh set -e REGISTRY="${REGISTRY:-ghcr.io/matthiasbruns/ocm-tutorials}" COMPONENT="ocm.software/podinfo" VERSION="6.9.1" CTF_DIR=$(mktemp -d) echo "CTF archive: $CTF_DIR" pause() { echo "\n>>> Next: $1" echo "--- Press Enter to continue ---" read } # Step 1: Create constructor.yaml cat <<EOF > constructor.yaml components: - name: ${COMPONENT} version: ${VERSION} provider: name: ocm.software resources: - name: podinfo version: ${VERSION} type: helmChart access: type: helm/v1 helmRepository: https://stefanprodan.github.io/podinfo helmChart: podinfo-${VERSION}.tgz EOF echo "Created constructor.yaml" pause "Add component version to CTF archive" # Step 2: Add component version to CTF ./ocm add cv \ --repository "ctf::${CTF_DIR}" \ --constructor constructor.yaml \ --skip-reference-digest-processing echo "Component version added to CTF" pause "Transfer with --upload-as ociArtifact" # Step 3: Transfer as ociArtifact ./ocm transfer cv \ --copy-resources \ --upload-as ociArtifact \ "ctf::${CTF_DIR}//${COMPONENT}:${VERSION}" \ "${REGISTRY}" echo "Transfer complete (ociArtifact)" pause "Verify: get component version from registry" # Step 4: Verify component version ./ocm get cv "${REGISTRY}//${COMPONENT}:${VERSION}" pause "Verify: inspect component descriptor to find imageReference" # Step 5: Inspect component descriptor to find imageReference ./ocm get cv "${REGISTRY}//${COMPONENT}:${VERSION}" -o yaml pause "Verify: download the chart resource" # Step 6: Download the chart resource rm -rf ./downloaded ./ocm download resource \ "${REGISTRY}//${COMPONENT}:${VERSION}" \ --identity "name=podinfo,version=${VERSION}" \ --output ./downloaded echo "\nDownloaded to ./downloaded:" ls -la ./downloaded # Cleanup pause "Clean up CTF archive" rm -rf "${CTF_DIR}" echo "Removed ${CTF_DIR}" echo "\nDone." ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added a detailed how-to for transferring Helm-chart-backed component versions between OCI registries via the CLI, including prerequisites, step-by-step workflow, verification, storage modes, cross-registry examples, and relevant commands. * **Chores** * Expanded repository configuration wordlist with two additional entries to recognize more terms. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Matthias Bruns <git@matthiasbruns.com> ef663ee
What this PR does / why we need it
Adds a how-to guide for transferring component versions containing Helm chart resources (
helm/v1access type) between OCI registries using the OCM CLI. Covers the--upload-as localBloband--upload-as ociArtifactoptions.Related to open-component-model/open-component-model#1846
Which issue(s) this PR is related to
Related to open-component-model/open-component-model#1846 (comment)
Type of content
getting-started/ortutorials/)how-to/)concepts/)reference/)Checklist
Test
Summary by CodeRabbit
Documentation
Chores