Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

chart-releaser

> 云原生
Open source

Hosting Helm Charts via GitHub Pages and Releases

782 stars0 likes0 views
WebsiteGitHub

About

Hosting Helm Charts via GitHub Pages and Releases

Chart Releaser

Helps Turn GitHub Repositories into Helm Chart Repositories

cr is a tool designed to help GitHub repos self-host their own chart repos by adding Helm chart artifacts to GitHub Releases named for the chart version and then creating an index.yaml file for those releases that can be hosted on GitHub Pages (or elsewhere!).

Installation

Binaries (recommended)

Download your preferred asset from the releases page and install manually.

Homebrew

bash
$ brew tap helm/tap
$ brew install chart-releaser

Go get (for contributing)

bash
// clone repo to some directory outside GOPATH

$ git clone https://github.com/helm/chart-releaser
$ cd chart-releaser
$ go mod download
$ go install ./...

Docker (for Continuous Integration)

Docker images are pushed to the helmpack/chart-releaser Quay container registry. The Docker image is built on top of Alpine and its default entry-point is cr. See the Dockerfile for more details.

Common Usage

Currently, cr can create GitHub Releases from a set of charts packaged up into a directory and create an index.yaml file for the chart repository from GitHub Releases.

…

Dealing with charts that have dependencies

Unfortuntely the releaser-tool won't automatically add repositories for dependencies, and this needs to be added to your pipeline (example), prior to running the releaser, like this:

yaml
    - name: add repos
        run: |
          helm repo add bitnami https://charts.bitnami.com/bitnami
          helm repo add bitnami-pre2022 https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami

      - name: Run chart-releaser
        uses: helm/[email protected]
        with:
          charts_dir: config/helm-chart
        env:
          CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

Create GitHub Releases from Helm Chart Packages

Scans a path for Helm chart packages and creates releases in the specified GitHub repo uploading the packages.

…

Push Chart Packages to an OCI Registry

Pushes every chart package found under --package-path to an OCI registry as /:. Sibling *.tgz.prov provenance files (produced by cr package --sign) are pushed automatically.

Credentials are read from the --username/--password flags (also CR_USERNAME / CR_PASSWORD env vars) when provided; otherwise the registry credentials store (~/.docker/config.json, populated by helm registry login or docker login) is used.

…

Example:

bash
cr push --registry-url oci://ghcr.io/myorg/charts \
        --username "$GITHUB_ACTOR" \
        --password "$GITHUB_TOKEN" \
        --skip-existing

Create the Repository Index from GitHub Releases

Once uploaded you can create an index.yaml file that can be hosted on GitHub Pages (or elsewhere).

…

Usage with a private repository

When using this tool on a private repository, helm is unable to download the chart package files. When you give Helm your username and password it uses it to authenticate to the repository (the index file). The index file then tells Helm where to get the tarball. If the tarball is hosted in some other location (Github Releases in this case) then it would require a second authentication (which Helm does not support). The solution is to host the files in the same place as your index file and make the links relative paths so there is no need for the second authentication.

#123 solve this by adding a --packages-with-index flag to the upload and index commands.

Prerequisites

Have a Github token with the right permissions (SSO enabled for entreprise) and Github Pages configured.

Usage

Here are the three commands you must run for a chart to end-up hosted in the root directory of your Github page and be accessible :

bash
cr package 
bash
cr upload --owner  --git-repo  --packages-with-index --token  --push --skip-existing

Don't forget the --skip-existing flag in the upload command to avoid getting a 422 Validation Failed error.

bash
cr index --owner  --git-repo   --packages-with-index --index-path . --token  --push

Example

With a testChart helm chart in the root of your repository :

bash
cr package testChart/

You will obtain the .tgz in the ./cr-release-pacakges

Do the two followng commands :

bash
cr upload --owner  --git-repo  --packages-with-index --token  --push --skip-existing

cr index --owner  --git-repo   --packages-with-index --index-path . --token  --push

You should obtain a release of your chart as well as the .tgz in the root of your github-pages branch.

With the index.yaml that references each chart and every different versions of those charts :

Configuration

cr is a command-line application. All command-line flags can also be set via environment variables or config file. Environment variables must be prefixed with CR_. Underscores must be used instead of hyphens.

CLI flags, environment variables, and a config file can be mixed. The following order of precedence applies:

  1. CLI flags
  2. Environment variables
  3. Config file

Examples

The following example show various ways of configuring the same thing:

CLI

bash
cr upload --owner myaccount --git-repo helm-charts --package-path .deploy --token 123456789

Environment Variables

bash
export CR_OWNER=myaccount
export CR_GIT_REPO=helm-charts
export CR_PACKAGE_PATH=.deploy
export CR_TOKEN="123456789"
export CR_GIT_BASE_URL="https://api.github.com/"
export CR_GIT_UPLOAD_URL="https://uploads.github.com/"
export CR_SKIP_EXISTING=true

cr upload

Config File

config.yaml:

yaml
owner: myaccount
git-repo: helm-charts
package-path: .deploy
token: 123456789
git-base-url: https://api.github.com/
git-upload-url: https://uploads.github.com/

Config Usage

bash
cr upload --config config.yaml

cr supports any format Viper can read, i.e. JSON, TOML, YAML, HCL, and Java properties files.

Notice that if no config file is specified, cr.yaml (or any of the supported formats) is loaded from the current directory, $HOME/.cr, or /etc/cr, in that order, if found.

Notes for Github Enterprise Users

For Github Enterprise, chart-releaser users need to set git-base-url and git-upload-url correctly, but the correct values are not always obvious to endusers.

By default they are often along these lines:

bash
https://ghe.example.com/api/v3/
https://ghe.example.com/api/uploads/

If you are trying to figure out what your upload_url is try to use a curl command like this: curl -u username:token https://example.com/api/v3/repos/org/repo/releases and then look for upload_url. You need the part of the URL that appears before repos/ in the path.

Common Error Messages

During the upload, you can get the following error :

bash
422 Validation Failed [{Resource:Release Field:tag_name Code:already_exists Message:}]

You can solve it by adding the --skip-existing flag to your command. More details can be found in #101 and in #111 that solved this.

Known Bug

Currently, if you set the upload URL incorrectly, let's say to something like https://example.com/uploads/, then cr upload will appear to work, but the release will not be complete. When everything is working there should be three assets in each release, but instead, there will only be two source code assets. The third asset is missing and is needed by Helm. This issue will become apparent when you run cr index and it always claims that nothing has changed, because it can't find the asset it expects for the release.

It appears like the go-github Do call does not catch the fact that the upload URL is incorrect and passes back the expected error. If the asset upload fails, it would be better if the release was rolled back (deleted) and an appropriate log message is displayed to the user.

The cr index command should also generate a warning when a release has no assets attached to it, to help people detect and troubleshoot this type of problem.

Issues· 55 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Gochartshelmhostingkubernetes

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category云原生
PricingOpen source

> Related tools

K
Kubernetes
容器编排事实标准
H
Helm
Kubernetes 包管理器
S
seaweedfs
SeaweedFS is a distributed storage system for object storage (S3), file systems, and Iceberg tables,