paint-brush
Using a private github repo as helm chart repo (https access)by@kavehmz
22,707 reads
22,707 reads

Using a private github repo as helm chart repo (https access)

by Kaveh Mousavi ZamaniSeptember 29th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

<a href="https://helm.sh/" target="_blank">Helm</a> is a nice package manager for Kubernetes. If you are using k8s specially in complex setups helm can help you in creating a nice release process.

Company Mentioned

Mention Thumbnail
featured image - Using a private github repo as helm chart repo (https access)
Kaveh Mousavi Zamani HackerNoon profile picture

Helm is a nice package manager for Kubernetes. If you are using k8s specially in complex setups helm can help you in creating a nice release process.

In complex setups sometimes you need a private helm repository for your packages.

This is how you can use a github repo, public or private, as helm repo.

Create a helm chart repo in github

It is easy. Create a repo and for adding packages, follow these commands





$ helm package $YOUR_CHART_PATH/ # to build the tgz file and copy it here$ helm repo index . # create or update the index.yaml for repo$ git add .$ git commit -m 'New chart version'$ git push

Access your repo

At the moment helm only understand http(s) for repository servers. The following trick shows how you can have that in a private or public github repo without using gh-pages.

You might know that github has a raw view. So simply use the following:





$ helm repo add sample 'https://raw.githubusercontent.com/kmzfs/helm-repo-in-github/master/'$ helm repo update$ helm search aerospikeNAME VERSION DESCRIPTIONsample/aerospike 0.1.2 A Helm chart for Aerospike in Kubernetes

and if you want to keep your repo private you can create a “Personal access tokens” and use it like:

$ helm repo add sample 'https://[email protected]/kmzfs/helm-repo-in-github/master/'

Just be careful who is creating the token and what is its level of access.


kmzfs/helm-repo-in-github_helm-repo-in-github - This is a sample for how to setup a helm repo in github_github.com