Working with Chart.yaml
1. Defining Chart Name and Version
| Field | Description | Example |
|---|---|---|
| name | The name of the chart | my-app |
| version | The chart version (semver 2.0) | 1.2.3 |
2. Setting Application Version
| Field | Description | Example |
|---|---|---|
| appVersion | Version of the application code | "1.2.3" |
Example: Setting appVersion in Chart.yaml
apiVersion: v2
name: my-app
version: 1.0.0
appVersion: "1.2.3"
3. Declaring API Version
| Field | Value | Description |
|---|---|---|
| apiVersion | v2 |
The API version of the chart. Must be v2 for Helm 3 and later. |
Note: The
apiVersion field is required and must be set to v2 for charts compatible with Helm 3. Charts using v1 are not supported in Helm 3.4. Specifying Chart Type
| Field | Description | Values |
|---|---|---|
| type | Specifies the chart type | application or library |
5. Adding Chart Description
| Field | Description | Example |
|---|---|---|
| description | A short description of the chart | "A Helm chart for deploying a sample application" |
Example: Chart Description
description: "A Helm chart for deploying a sample application with multiple services"
6. Adding Keywords and Sources
| Field | Description | Example |
|---|---|---|
| keywords | List of keywords for the chart | ["helm", "kubernetes", "deployment"] |
| sources | List of URLs to source code for this chart | ["https://github.com/example/chart"] |
Example: Chart.yaml with keywords and sources
apiVersion: v2
name: my-app
description: A Helm chart for my application
version: 1.0.0
appVersion: "1.0"
keywords:
- helm
- kubernetes
- deployment
sources:
- https://github.com/example/my-app
7. Listing Chart Maintainers
| Field | Description | Example |
|---|---|---|
| maintainers | List of chart maintainers with name, email, and URL | |
Example: Chart.yaml with Maintainers
name: my-app
version: 1.2.3
description: A sample Helm chart
maintainers:
- name: John Doe
email: john.doe@example.com
url: https://github.com/johndoe
- name: Jane Smith
email: jane.smith@example.com
url: https://github.com/janesmith
8. Setting Home URL
| Field | Value Type | Description | Example |
|---|---|---|---|
| home | string |
URL to the project home page | https://example.com/helm-chart |
Example: Setting Home URL in Chart.yaml
apiVersion: v2
name: my-app
description: A Helm chart for my application
version: 1.0.0
appVersion: "1.0"
home: https://example.com/my-app
9. Adding Icon URL
| Field | Description | Value |
|---|---|---|
| icon | URL to the icon of the chart | https://example.com/icon.png |
Example: Setting Icon URL in Chart.yaml
apiVersion: v2
name: my-app
version: 1.0.0
icon: https://example.com/icon.png
10. Marking Chart Deprecated
| Field | Value | Description |
|---|---|---|
| deprecated | true |
Set to true to mark the chart as deprecated |
Example: Marking a Chart as Deprecated
apiVersion: v2
name: my-app
description: A Helm chart for my application
version: 1.0.0
appVersion: "1.0"
deprecated: true
Note: Setting
deprecated: true in Chart.yaml will mark the chart as deprecated in Helm repositories and tools.11. Setting Kubernetes Version Constraint
| Field | Value | Description |
|---|---|---|
| kubeVersion | 1.28.0 |
Defines the minimum Kubernetes version required for the chart to function properly. |