Commit 2e53fd2
committed
docs: add how-to for transferring Helm charts with OCM (#751)
#### 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> ef663ee1 parent 7271084 commit 2e53fd2
File tree
71 files changed
+148
-73
lines changed- dev
- docs
- concepts
- credential-system
- ocm-components
- ocm-controllers
- ocm-coordinates
- resolvers
- transfer-and-transport
- getting-started
- create-component-versions
- deploy-helm-charts
- install-the-ocm-cli
- set-up-controller-environments
- how-to
- configure-credentials-for-multiple-registries
- download-resources-from-component-versions
- how-to-use-the-ocm-cli-container-image
- migrate-from-fallback-to-deterministic-repository-resolvers
- migrate-legacy-credentials
- resolving-components-across-multiple-registries
- transfer-components-across-an-air-gap
- transfer-helm-charts-with-ocm
- overview
- about-the-ocm-project
- benefits-of-ocm
- reference
- ocm-cli
- ocm-add-component-version
- ocm-add
- ocm-completion-bash
- ocm-completion-fish
- ocm-completion-powershell
- ocm-completion-zsh
- ocm-completion
- ocm-describe-types
- ocm-describe
- ocm-download-plugin
- ocm-download-resource
- ocm-download
- ocm-generate-docs
- ocm-generate
- ocm-get-component-version
- ocm-get-types
- ocm-get
- ocm-plugin-registry-get
- ocm-plugin-registry-list
- ocm-plugin-registry
- ocm-plugin
- ocm-sign-component-version
- ocm-sign
- ocm-transfer-component-version
- ocm-transfer
- ocm-verify-component-version
- ocm-verify
- ocm-version
- ocm
- resolver-configuration
- tutorials
- credentials-for-ocm-controllers
- deploy-a-helm-chart-with-bootstrap
- example-component-descriptor
- input-and-access-types
- signing-and-verification
- structure-software-products-with-ocm
- understand-credential-resolution
- working-with-resolvers
- docs/overview/specification
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
71 files changed
+148
-73
lines changedLarge diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
0 commit comments