Publishing Charts to Repository

1. Generating Repository Index

Example: Build index from directory

helm repo index ./dist --url https://charts.acme.io

2. Updating Index with New Chart

FlagEffect
--merge ./old-index.yamlPreserve existing entries (avoids losing old versions)

Example: Incremental index

helm package ./chart -d ./dist
helm repo index ./dist --url https://charts.acme.io --merge ./dist/index.yaml

3. Setting Base URL

FlagUse
--urlPublic download URL prefix for each .tgz

4. Hosting Static Repository

BackendNotes
S3 / GCS / Azure BlobPublic bucket + --url
Nginx / ApachePlain HTTPS file server
GitHub PagesFree; via gh-pages branch

5. Using GitHub Pages

Example: Publish via gh-pages

git checkout gh-pages
helm package ../charts/api -d .
helm repo index . --url https://acme.github.io/charts --merge index.yaml
git add . && git commit -m "release api 1.4.2" && git push

6. Publishing to ChartMuseum

Example: Push via cm-push plugin

helm plugin install https://github.com/chartmuseum/helm-push
helm repo add chartmuseum https://charts.corp.example.com
helm cm-push ./chart chartmuseum

7. Publishing to Harbor

Example: Harbor OCI

helm registry login harbor.acme.io -u $USER -p $PASS
helm package ./chart
helm push chart-1.4.2.tgz oci://harbor.acme.io/charts

8. Publishing to Artifactory

MethodCommand
REST APIcurl -u user:pass -T chart-1.4.2.tgz https://artifactory/charts/
JFrog CLIjfrog rt u chart-1.4.2.tgz helm-local/
OCI modehelm push ... oci://artifactory.acme.io/charts

9. Automating Repository Updates

Example: Release workflow

name: Release Charts
on:
  push:
    branches: [main]
jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { fetch-depth: 0 }
      - uses: azure/setup-helm@v4
      - uses: helm/chart-releaser-action@v1.6.0
        env:
          CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}

10. Managing Repository Versions

PracticeReason
Never delete old versionsBreaks reproducibility for pinned deployments
Use SemVer + immutable tagsRepublishing same version corrupts caches
Sign packagesVerify integrity (esp. with mirrored repos)