Skip to content

A Helm plugin that turns any existing version control repository into a chart repository

License

Notifications You must be signed in to change notification settings

steven-sheehy/helm-vcs

Helm VCS

CircleCI License Apache GitHub release

Turns any existing version control repository into a chart repository

Motivation

Setting up a Helm chart repository has always been more difficult than necessary. Tools like ChartMuseum make it easier, but still require a server and the repository must live separate from the code. Chart Releaser and the Helm Github Plugin are great, but require integration with the release process and are specific to git and GitHub.

The goal of Helm VCS is to turn any version control system (VCS) into a chart repository, without requiring any changes to that repository. It does this by recursively searching the repository for valid charts and generating the chart repository dynamically on the client-side. By default, every tag is checked out and examined for charts. If needed, the search can also be done for a specific ref (branch, tag or commit).

Packaging the chart client-side alleviates developers from having to package and store chart binaries and focus purely on the source code. The chart artifact is generated consistently for different consumers due to it being backed by version control. Using version control's immutable tags for chart versioning simplifies the release process.

Installation

Releases can be installed directly as a helm plugin. Find the release for your OS and architecture and pass the URL to helm plugin install <URL>. For Example:

$ helm plugin install https://github.com/steven-sheehy/helm-vcs/releases/download/0.1.0/helm-vcs_0.1.0_linux_amd64.tar.gz
$ chmod +x ~/.helm/plugins/helm-vcs_0.1.0_linux_amd64/helm-vcs

Note: The chmod command is necessary since Helm doesn't respect the executable permission from the tar file.

Usage

Add Repository

Since the VCS repo may not always be a valid URI (e.g., git@github.com:steven-sheehy/helm-vcs.git), the normal approach of helm repo add <name> <uri> can't be used. To add a chart repository, instead use the plugin specific init command:

$ helm vcs init myrepo git://github.com/steven-sheehy/helm-vcs-test.git --path charts/ --tags

This command will scan the URI for charts, generate an index.yaml from that information and add it as a chart repository to helm with the given name. If needed, this command can be ran multiple times to update the URI or other parameters. See below for a list of all options:

$ helm vcs init --help
usage: helm vcs init [<flags>] <name> <uri>

Initialize the chart repository using the VCS repository as its source

Flags:
  --help       Show context-sensitive help (also try --help-long and --help-man).
  --path=PATH  A path within the repository that contains charts
  --ref=REF    A specific tag, branch or commit to checkout
  --use-tag    Override the Chart.yaml version with the VCS tag

Args:
  <name>  The chart repository name
  <uri>   The VCS URI

Update Repository

After adding the repository, there shouldn't be a need to interact with the helm vcs command again. Repository updates, chart installs, etc. will be handled by the regular Helm commands. For example, this command will fetch and rescan the latest charts from VCS:

$ helm repo update

Uninstall

$ helm repo remove helm-vcs-test
$ helm plugin remove vcs

About

A Helm plugin that turns any existing version control repository into a chart repository

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published