How to release a helm chart on our own repo

helm repo release package

2 min read | by Jordi Prats

To be able to create a release of a helm chart we will need to first, create the package and then generate / update the index.yaml for being able to serve it as a repo using any webserver of our choice

To be able to release a chart we can just create a tar with the templates ignoring the files on the .helmignore file, or let helm do it for us using helm package*. It's usage it's as straigforward as this:

$ helm package .
Successfully packaged chart and saved it to: /home/pet2cattle/git/ampa/helm-ampa/ampa-1.0.1.tgz

Once we have the file, to be able to create a helm repository from with helm can retrieve charts we will have to create a index.yaml. Again, helm can also do it for us using helm repo index:

$ helm repo index .

This generates a index file as follows. In this example we only have one release available:

apiVersion: v1
entries:
  ampa:
  - apiVersion: v2
    appVersion: "3.56"
    created: "2021-04-17T12:57:53.972445585+02:00"
    description: AMPA
    digest: b4f5423ca79ccb38d0ae12be5f6cddedfd57cae97fb2f3a5d57fdbf6907bd7bd
    name: ampa
    type: application
    urls:
    - ampa-1.0.3.tgz
    version: 1.0.3
generated: "2021-04-17T12:57:53.971477552+02:00"

Once we have the tarball and the index.yaml, we just need to serve them on any URL (for example using nginx) to be able to use them as a repo


Posted on 21/04/2021

Categories