Helm Artifact Registry
About 366 wordsAbout 1 min
Login to CNB Helm Artifact Registry
CNB Helm only supports Helm artifacts in OCI format. It is recommended to use Helm v3.8.0 or above. For details, please refer to the Helm documentation.
You can use CNB access token as login credentials, login command:
helm registry login helm.cnb.cool -u cnb -p {token-value}
Helm Artifact Path Rules
When publishing artifacts to a repository, two naming rules are supported:
- Same-name artifacts - Artifact path matches repository path, e.g.:
helm.cnb.cool/{repository-path}
- Different-name artifacts - Repository path serves as namespace for artifacts, artifact path = repository path/artifact name, e.g.:
helm.cnb.cool/{repository-path}/{artifact-name}
Note: When using helm push remote, the chart name does not appear in the remote-url, but is read from the chart.
Therefore, for same-name artifacts, the remote-url is helm.cnb.cool/{group-path}
, and for different-name artifacts, the remote-url is helm.cnb.cool/{repository-path}
.
Pushing Artifacts
Local Push
Same-name artifacts
# chart name must match repository name
helm package chart-path
helm push chartname-version.tgz oci://helm.cnb.cool/{group-path}
Different-name artifacts
helm package chart-path
helm push chartname-version.tgz oci://helm.cnb.cool/{repository-path}
Push in Cloud Native Build
main:
push:
- docker:
image: alpine/helm
stages:
- name: helm login
script: helm registry login -u ${CNB_TOKEN_USER_NAME} -p "${CNB_TOKEN}" ${CNB_HELM_REGISTRY}
- name: helm package
script: helm package ${YOUR_CHART_PATH}
- name: helm push
script: helm push oci://${CNB_HELM_REGISTRY}/${CNB_GROUP_SLUG_LOWERCASE}
Push in Workspaces
Same-name artifacts
# chart name must match repository name
helm package ${YOUR_CHART_PATH}
helm push chartname-version.tgz oci://helm.cnb.cool/{grou-path}
Different-name artifacts
helm package ${YOUR_CHART_PATH}
helm push chartname-version.tgz oci://helm.cnb.cool/{repository-path}
Using Artifacts
Pull from Local Command Line
helm pull oci://helm.cnb.cool/{artifact-path} --version {version}
# ...
Other Common Commands
View Helm Information
helm show all oci://helm.cnb.cool/{artifact-path} --version {version}
Preview Manifest
helm template {my-release} oci://helm.cnb.cool/{artifact-path} --version {version}
Install Helm Chart
helm install {my-release} oci://helm.cnb.cool/{artifact-path} --version {version}
Upgrade Helm Chart
helm upgrade {my-release} oci://helm.cnb.cool/{artifact-path} --version {version}
More Usage
For more Helm usage, please refer to the official documentation