Skip to content

Helm Plugin - Install Helm Charts directly from Git repositories

License

Notifications You must be signed in to change notification settings

tomhoward87/helm-git

 
 

Repository files navigation

helm-git

GitHub Actions License MIT GitHub release semantic-release

The Helm downloader plugin that provides GIT protocol support.

This fits multiple use cases:

  • Need to keep charts private
  • Doesn't want to package charts before installing
  • Charts in a sub-path, or with another ref than master
  • Pull values files directly from (private) Git repository

Install

Use helm CLI to install this plugin:

helm plugin install https://github.com/aslafy-z/helm-git --version 0.11.1

To use the plugin, you only need git. If you want to build the plugin from source, or you want to contribute to the plugin, please see these instructions.

Uninstall

helm plugin remove helm-git

Usage

helm-git will package any chart that is not so you can directly reference paths to original charts.

Here's the Git urls format, followed by examples:

git+https://[provider.com]/[user]/[repo]@[path/to/charts][?[ref=git-ref][&sparse=0][&depupdate=0]]
git+ssh://git@[provider.com]/[user]/[repo]@[path/to/charts][?[ref=git-ref][&sparse=0][&depupdate=0]]
git+file://[path/to/repo]@[path/to/charts][?[ref=git-ref][&sparse=0][&depupdate=0]]

git+https://github.com/jetstack/cert-manager@deploy/charts?ref=v0.6.2&sparse=0
git+ssh://[email protected]/jetstack/cert-manager@deploy/charts?ref=v0.6.2&sparse=1
git+ssh://[email protected]/jetstack/cert-manager@deploy/charts?ref=v0.6.2
git+https://github.com/istio/istio@install/kubernetes/helm?ref=1.5.4&sparse=0&depupdate=0
git+https://github.com/bitnami/charts@bitnami/wordpress?depupdate=0?ref=master&sparse=0&depupdate=0&package=0

Add your repository:

helm repo add cert-manager git+https://github.com/jetstack/cert-manager@deploy/charts?ref=v0.6.2

You can use it as any other Helm chart repository. Try:

$ helm search cert-manager
NAME                                    CHART VERSION   APP VERSION     DESCRIPTION
cert-manager/cert-manager               v0.6.6          v0.6.2          A Helm chart for cert-manager

$ helm install cert-manager/cert-manager --version "0.6.6"

Fetching also works:

helm fetch cert-manager/cert-manager --version "0.6.6"
helm fetch git+https://github.com/jetstack/cert-manager@deploy/charts/cert-manager-v0.6.2.tgz?ref=v0.6.2

Pulling value files:

helm install . -f git+https://github.com/aslafy-z/helm-git@tests/fixtures/example-chart/values.yaml

Environment

name description default
HELM_GIT_HELM_BIN Path to the helm binary. If not set, $HELM_BIN will be used helm
HELM_GIT_DEBUG Increase helm-git log level to maximum 0

Arguments

name description default
ref Set git ref to a branch or tag. Works also for commits with sparse=0 master
sparse Set git strategy to sparse. Will try to fetch only the needed commits for the target path 1
depupdate Run helm dependency update on the retrieved chart 1
package Run helm package on the retrieved chart 1

Note on Git authentication

As this plugin uses git CLI to clone repos. You can configure private access in the same manner that with any git repo.

Troubleshooting

You can enable debug output by setting HELM_GIT_DEBUG environment variable to 1:

HELM_GIT_DEBUG=1 helm repo add cert-manager git+https://github.com/jetstack/cert-manager@deploy/charts?ref=v0.6.2

In order to debug in a more efficient maneer, I advise you use helm fetch instead of helm repo add.

Contributing

Contributions are welcome! Please see these instructions that will help you to develop the plugin.

Alternatives

License

MIT

About

Helm Plugin - Install Helm Charts directly from Git repositories

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 96.7%
  • JavaScript 3.3%