Helm Artifact Repository

# Log in to CNB Helm Artifact Repository

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's access token as a login credential. The login command is:

helm registry login helm.cnb.cool -u cnb -p {token-value}

# Helm Artifact Path Rules

When a Helm artifact is published to a repository, two naming rules are supported:

  1. Same-name artifact - The artifact path is consistent with the repository path, such as: helm.cnb.cool/{repository-path}
  2. Non-same-name artifact - The repository path serves as the namespace of the artifact, and the artifact path = repository-path/artifact name, such as: helm.cnb.cool/{repository-path}/{artifact-name}

Note: When pushing Helm to remote, the chart name does not appear in the remote-url, but is read from the chart.

Therefore, the remote-url of the same-name artifact is helm.cnb.cool/{group-path}, and the remote-url of the non-same-name artifact is helm.cnb.cool/{repository-path}.

# Push Artifact

# Push from Local

Same-name artifact:

# The chart name needs to be the same as the repository
helm package chart-path
helm push chartname-version.tgz oci://helm.cnb.cool/{group-path}

Non-same-name artifact:

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 ${CNB_REPO_NAME}
        - name: helm push
          script: helm push oci://${CNB_HELM_REGISTRY}/${CNB_GROUP_SLUG_LOWERCASE}

# Push in Cloud Native Development

Same-name artifact:

# The chart name needs to be the same as the repository
helm package chart-path
helm push chartname-version.tgz oci://helm.cnb.cool/{group-path}

Non-same-name artifact:

helm package chart-path
helm push chartname-version.tgz oci://helm.cnb.cool/{repository-path}

# Use Artifact

# 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.