Skip to content
This repository was archived by the owner on Apr 13, 2026. It is now read-only.

docs: add how-to for transferring Helm charts with OCM#751

Merged
jakobmoellerdev merged 5 commits into
open-component-model:mainfrom
matthiasbruns:feat/helm_transfer_howto
Mar 13, 2026
Merged

docs: add how-to for transferring Helm charts with OCM#751
jakobmoellerdev merged 5 commits into
open-component-model:mainfrom
matthiasbruns:feat/helm_transfer_howto

Conversation

@matthiasbruns

@matthiasbruns matthiasbruns commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

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/)
  • How-to Guide (how-to/)
  • Explanation / Concept (concepts/)
  • Reference (reference/)
  • Other (infrastructure, config, fixes)

Checklist

  • I have read and followed the Contributing Guide
  • All commands/code snippets are tested and can be copy-pasted

Test

#!/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."

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.

On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@netlify

netlify Bot commented Mar 10, 2026

Copy link
Copy Markdown

Deploy Preview for open-component-model ready!

Name Link
🔨 Latest commit 6eb398f
🔍 Latest deploy log https://app.netlify.com/projects/open-component-model/deploys/69b2d817ef2ece0008c56f12
😎 Deploy Preview https://deploy-preview-751--open-component-model.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Mar 10, 2026

Copy link
Copy Markdown

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds 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

Cohort / File(s) Summary
Wordlist Configuration
\.github/config/wordlist.txt
Appended two entries: pullable, descriptor's. (Additive, +2 lines)
Documentation
content/docs/how-to/transfer-helm-charts.md
New how‑to guide (+~168 lines) detailing prerequisites and step‑by‑step OCM CLI workflows to create, package, transfer, and verify Helm‑chart component versions across OCI registries, including storage modes, YAML/CLI examples, cross‑registry and air‑gap notes.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • morri-son

Poem

🐰
I nibble words and tidy the list,
Pack charts in crates with a careful twist,
Commands and crates, a hop and a cheer,
Off they go to registries far and near! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs: add how-to for transferring Helm charts with OCM' directly and accurately summarizes the main change: adding a how-to guide for transferring Helm charts using OCM.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan for PR comments
  • Generate coding plan

Comment @coderabbitai help to get the list of available commands and usage tips.

On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns force-pushed the feat/helm_transfer_howto branch from 6c76420 to 1c4f77b Compare March 11, 2026 10:48
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns force-pushed the feat/helm_transfer_howto branch from 57cd284 to 31790cf Compare March 11, 2026 12:50
@matthiasbruns matthiasbruns marked this pull request as ready for review March 11, 2026 13:16
@matthiasbruns matthiasbruns requested a review from a team as a code owner March 11, 2026 13:16

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1f0c8b2 and 31790cf.

📒 Files selected for processing (2)
  • .github/config/wordlist.txt
  • content/docs/how-to/transfer-helm-charts.md

Comment thread content/docs/how-to/transfer-helm-charts.md Outdated
@matthiasbruns matthiasbruns marked this pull request as draft March 11, 2026 13:24
@matthiasbruns

Copy link
Copy Markdown
Contributor Author

reworking - this is confusing myself :D

On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns force-pushed the feat/helm_transfer_howto branch from 115a0b6 to f40bf89 Compare March 11, 2026 13:29
@matthiasbruns

Copy link
Copy Markdown
Contributor Author

@coderabbitai I rewrote that thing

@coderabbitai

coderabbitai Bot commented Mar 11, 2026

Copy link
Copy Markdown

@matthiasbruns Sure! Let me take a fresh look at the updated content now.


🧠 Learnings used
Learnt from: frewilhelm
Repo: open-component-model/ocm-website PR: 745
File: content_versioned/version-legacy/docs/getting-started/setup-controller.md:85-91
Timestamp: 2026-03-10T08:53:56.330Z
Learning: In the `open-component-model/ocm-website` repository, the `<pre-release>` placeholder used in helm install commands (e.g., `oci://ghcr.io/open-component-model/kubernetes/controller/chart:<pre-release>`) is intentionally temporary documentation pending an official Helm chart release. It should be replaced with a stable version tag once the official release is published.
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
content/docs/how-to/transfer-helm-charts.md (2)

65-75: Consider briefly mentioning the --upload-as localBlob alternative.

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 both localBlob and ociArtifact modes were tested and commits reference clarifying the difference, a brief note about when to use localBlob instead 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 imageReference in 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

📥 Commits

Reviewing files that changed from the base of the PR and between 31790cf and f40bf89.

📒 Files selected for processing (2)
  • .github/config/wordlist.txt
  • content/docs/how-to/transfer-helm-charts.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/config/wordlist.txt

@matthiasbruns matthiasbruns marked this pull request as ready for review March 11, 2026 16:12

@jakobmoellerdev jakobmoellerdev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly good, just some concerns on missing features

Comment thread content/docs/how-to/transfer-helm-charts.md Outdated
Comment thread content/docs/how-to/transfer-helm-charts.md Outdated

@Skarlso Skarlso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a single comment, otherwise lgtm

Comment thread .github/config/wordlist.txt Outdated
@matthiasbruns matthiasbruns force-pushed the feat/helm_transfer_howto branch from 3ea1e6c to 3ed3a23 Compare March 12, 2026 14:41
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns force-pushed the feat/helm_transfer_howto branch from 3ed3a23 to 6eb398f Compare March 12, 2026 15:13

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3ed3a23 and 6eb398f.

📒 Files selected for processing (2)
  • .github/config/wordlist.txt
  • content/docs/how-to/transfer-helm-charts.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/config/wordlist.txt

Comment thread content/docs/how-to/transfer-helm-charts.md
Comment thread content/docs/how-to/transfer-helm-charts.md
Comment thread content/docs/how-to/transfer-helm-charts.md
Comment thread content/docs/how-to/transfer-helm-charts.md
@jakobmoellerdev jakobmoellerdev merged commit ef663ee into open-component-model:main Mar 13, 2026
10 checks passed
@matthiasbruns matthiasbruns deleted the feat/helm_transfer_howto branch March 13, 2026 08:33
ocmbot Bot pushed a commit that referenced this pull request Mar 13, 2026
#### 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants