The Chart.yaml File
The Chart.yaml
file is required for a chart. It contains the following fields:
apiVersion: The chart API version, always "v1" (required)
name: The name of the chart (required)
version: A SemVer 2 version (required)
kubeVersion: A SemVer range of compatible Kubernetes versions (optional)
description: A single-sentence description of this project (optional)
keywords:
- A list of keywords about this project (optional)
home: The URL of this project's home page (optional)
sources:
- A list of URLs to source code for this project (optional)
maintainers: # (optional)
- name: The maintainer's name (required for each maintainer)
email: The maintainer's email (optional for each maintainer)
url: A URL for the maintainer (optional for each maintainer)
engine: gotpl # The name of the template engine (optional, defaults to gotpl)
icon: A URL to an SVG or PNG image to be used as an icon (optional).
appVersion: The version of the app that this contains (optional). This needn't be SemVer.
deprecated: Whether this chart is deprecated (optional, boolean)
tillerVersion: The version of Tiller that this chart requires. This should be expressed as a SemVer range: ">2.0.0" (optional)
If you are familiar with the Chart.yaml
file format for Helm Classic, you willnotice that fields specifying dependencies have been removed. That is becausethe new Chart format expresses dependencies using the charts/
directory.
Other fields will be silently ignored.
Charts and Versioning
Every chart must have a version number. A version must follow theSemVer 2 standard. Unlike Helm Classic, KubernetesHelm uses version numbers as release markers. Packages in repositoriesare identified by name plus version.
For example, an nginx
chart whose version field is set to version:1.2.3
will be named:
nginx-1.2.3.tgz
More complex SemVer 2 names are also supported, such asversion: 1.2.3-alpha.1+ef365
. But non-SemVer names are explicitlydisallowed by the system.
NOTE: Whereas Helm Classic and Deployment Manager were bothvery GitHub oriented when it came to charts, Kubernetes Helm does notrely upon or require GitHub or even Git. Consequently, it does not useGit SHAs for versioning at all.
The version
field inside of the Chart.yaml
is used by many of theHelm tools, including the CLI and the Tiller server. When generating apackage, the helm package
command will use the version that it findsin the Chart.yaml
as a token in the package name. The system assumesthat the version number in the chart package name matches the version number inthe Chart.yaml
. Failure to meet this assumption will cause an error.
The appVersion field
Note that the appVersion
field is not related to the version
field. It isa way of specifying the version of the application. For example, the drupal
chart may have an appVersion: 8.2.1
, indicating that the version of Drupalincluded in the chart (by default) is 8.2.1
. This field is informational, andhas no impact on chart version calculations.
Deprecating Charts
When managing charts in a Chart Repository, it is sometimes necessary todeprecate a chart. The optional deprecated
field in Chart.yaml
can be usedto mark a chart as deprecated. If the latest version of a chart in therepository is marked as deprecated, then the chart as a whole is considered tobe deprecated. The chart name can later be reused by publishing a newer versionthat is not marked as deprecated. The workflow for deprecating charts, asfollowed by the helm/chartsproject is:
- Update chart’s
Chart.yaml
to mark the chart as deprecated, bumping the version - Release the new chart version in the Chart Repository
- Remove the chart from the source repository (e.g. git)