Skip to content
Helm plugin to use Git as a chart repository
Python Shell
Branch: master
Clone or download
Latest commit 1f106c3 Aug 9, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE add license Aug 7, 2019
README.rst update docs Aug 9, 2019
git-repo-fetch.sh MVP Aug 7, 2019
git-repo.sh add setuptools setup.py Aug 8, 2019
git_repo.py update docs Aug 8, 2019
install.sh fix install location Aug 8, 2019
plugin.yaml mark v0.2.0 Aug 8, 2019
requirements.txt initial commit/stash Sep 28, 2018
setup.py mark v0.2.0 Aug 8, 2019

README.rst

helm-git-repo

Helm plugin to use Git as a chart repository

Requirements

  • Helm >= 2.14.3 (might work with older 2.x versions)
  • Python >= 3.7 (might work with older 3.x versions)
  • pip
  • Git

Installation

Install the latest development version:

$ helm plugin install https://github.com/jashandeep-sohi/helm-git-repo

Usage

$ helm git-repo --help
Usage: helm git-repo [OPTIONS] COMMAND [ARGS]...

Options:
  --log-level [critical|error|warning|info|debug]
                                  Log level  [default: critical]
  --help                          Show this message and exit.

Commands:
  add    Add a Git chart repository.
  index  Generate an index file from chart directories.

Add

To add a Git chart repository compatible with this plugin, use the add subcommand:

$ helm git-repo add --help
Usage: helm git-repo add [OPTIONS] NAME GIT_URL

  Add a Git chart repository.

Options:
  --branch TEXT      Git branch to use  [default: master]
  --index-path TEXT  Path to index file in Git repository  [default:
                     index.yaml]
  --help             Show this message and exit.

For example:

$ helm git-repo add test 'https://github.com/jashandeep-sohi/charts.git' --index-path=stable/index.yaml

Now you can fetch/inspect/install/etc charts from this repo using the usual commands:

$ helm fetch test/prometheus
$ helm inspect test/prometheus
$ helm install test/prometheus
$ helm search --versions test/
NAME            CHART VERSION   APP VERSION     DESCRIPTION
test/prometheus 8.15.0          2.11.1          Prometheus is a monitoring system and time series database.
test/prometheus 6.2.1           2.2.1           Prometheus is a monitoring system and time series database.
test/rethinkdb  1.0.0           0.1.0           The open-source database for the realtime web
test/rethinkdb  0.1.3           0.1.0           The open-source database for the realtime web

Index

To create a Git chart repository compatible with this plugin, you'll need to index it using:

$ helm git-repo index --help
Usage: helm git-repo index [OPTIONS] [CHART_DIRS]...

  Generate an index file from chart directories.

Options:
  --out FILENAME                  File to write the index to  [default: -]
  --merge FILE                    Merge the generated index from the given
                                  index
  --skip-prompt / --no-skip-prompt
  --help                          Show this message and exit.

Let's use a fork of the official helm charts as an example:

$ git clone 'https://github.com/jashandeep-sohi/charts.git' charts
$ cd charts/

To index the chart in stable/prometheus directory:

$ helm git-repo index stable/prometheus --out stable/index.yaml

You can also pass in multiple chart directories:

$ helm git-repo index stable/prometheus stable/rethinkdb --out stable/index.yaml

Or, if you like, you can also build up the index incrementally:

$ helm git-repo index stable/rethinkdb --out stable/index.yaml --merge stable/index.yaml

Note: helm git-repo index must be called from a Git working directory. Also, it will use chart files from the latest commit to generate the index, so please be sure to commit any chart changes before generating the index.

Next you'll want to publish the index by commiting & pushing it out:

$ git add stable/index.yaml
$ git commit ...
$ git push ...

Now this this chart repository can be added with helm git-repo add ...

You can’t perform that action at this time.