Helm Repositories
External
Internal
Overview
Revised for Helm 3
A repository is a place - usually a HTTP server - where charts are collected and shared. A local directory can be used as Helm repository too, charts can refer to their dependencies using a file://... syntax. The charts maintained and exposed by repository in an archived format. A repository must expose in its root an index.yaml file that contains a list of all packages supplied by repository, together with metadata that allows retrieving and verifying those packages. When Helm is installed, it is pre-configured with a default repository. New repositories an be added. The list of locally-configured repository can be inspected with helm repo list. Repositories can be searched for charts with helm search. Because chart repositories change frequently, it is recommended to update the local cache. Using Helm repositories is recommended practice, but they are optional. A Helm chart can be deployed directly from the local filesystem. Charts are stored and exposed in repositories as chart archives whose name include the chart name and version:
my-chart-1.2.3.tgz
As newer versions are added, the old version stay around, so they can be still looked up when an older version is needed.
Helm 2 came with a built-in package server for developer testing. It seems, however, that the helm serve
has been removed in Helm 3.
Helm Hub
The canonical source for Helm chart is the Helm Hub https://hub.helm.sh/, an aggregator for distributed chart repositories. Helm Hub exposes "stable" and "incubator", as well as many other repositories.
Repository Name
Each locally-added repository is known under a name, which is associated with the repository URL.
Repository URL
The repository URL represents the endpoint of a Helm repository - the endpoint's root must contain an index.yaml file. Also see the discussion for the special case of dependency charts that exist on the local file system.
Default Repository
When Helm is installed, it is pre-configured to look into the official Helm Charts GitHub repository, named "stable".
Local Cache
In Helm 2, the local repository cache is maintained under ~/.helm/repository.
TODO investigate ~/.helm/repository
Chart Reference
A chart stored in a chart repository can be identified by its chart reference, relative to the repository. The chart reference and the chart name are semantically equivalent. The chart reference, or the chart name, is used to specify the chart when installed.
Repository Structure
charts/ | +- index.yaml | +- blue-1.0.0.tgz +- blue-1.0.1.tgz +- blue-1.0.2.tgz
index.yaml
The index file contains metadata about hosted charts, including the content of Chart.yaml, and it. is generated by helm repo index.
Example if an index file:
apiVersion: v1
entries:
a:
- apiVersion: v2
created: "2019-12-15T14:01:02.326198-08:00"
dependencies:
- name: b
repository: http://localhost/charts
version: 1.0.0
digest: 64627fcd102f2ac9271bfb36e38d57ba3e9c4636fb42fbff582e83d999e7ab3f
name: a
urls:
- a-1.0.0.tgz
version: 1.0.0
b:
- apiVersion: v2
created: "2019-12-15T14:01:02.326484-08:00"
dependencies:
- name: c
repository: http://localhost/charts
version: 1.0.0
digest: 064e1d3507270014718f9fc4539f1ce0c12585bc94d95c82fe5966e25e08582b
name: b
urls:
- b-1.0.0.tgz
version: 1.0.0
c:
- apiVersion: v2
created: "2019-12-15T14:01:02.32662-08:00"
digest: a5fbc1d4d9a73c0f16d8c769c8118101f63bde617d46d636c14fb99059bcd96a
name: c
urls:
- c-1.0.0.tgz
version: 1.0.0
generated: "2019-12-15T14:01:02.324043-08:00"