Skip to main content

Packaging Charts

1. Creating Chart Package

Field Description Example
apiVersion API version of the chart v2
name Name of the chart myapp
version Chart version (semantic versioning) 1.0.0
appVersion Version of the application being deployed 1.2.3
description Short description of the chart A Helm chart for deploying myapp
home Home page URL of the chart https://example.com/myapp
icon URL to an icon image https://example.com/myapp-icon.png
maintainers List of chart maintainers [{name: "John Doe", email: "john@example.com"}]
keywords List of keywords for the chart [web, app, example]
sources List of URLs to source code [https://github.com/example/myapp]

Example: Creating a basic Chart.yaml

apiVersion: v2
name: myapp
version: 1.0.0
appVersion: 1.2.3
description: A Helm chart for deploying myapp
home: https://example.com/myapp
icon: https://example.com/myapp-icon.png
maintainers:
  - name: John Doe
    email: john@example.com
keywords:
  - web
  - app
  - example
sources:
  - https://github.com/example/myapp
Note: The apiVersion field must be set to v2 for charts using the newer Helm 3 format.
Warning: Chart versions must follow semantic versioning (SemVer) standards.

2. Setting Package Destination

Option Values Description
--destination string Directory to copy the packaged chart into. Defaults to current working directory.
--app-version string Override the appVersion in the Chart.yaml file.
--version string Override the version in the Chart.yaml file.

Example: Packaging to a specific directory

helm package my-chart --destination ./packages
Note: The --destination flag allows you to specify where the packaged chart tarball will be saved. If not specified, it defaults to the current working directory.

3. Signing Chart Package

Option Values Description
--sign true Sign the chart package using the specified key
--key string Name of the key to use for signing
--keyring string Path to the keyring file for signing

Example: Signing a Chart Package

helm package --sign --key my-key ./my-chart
Note: The chart must be signed with a GPG key that is available in the local keyring.

4. Using Package Key

Property Description Default Notes
package.key Key used to sign the package None Required for signed packages

Example: Signing a Helm Chart Package

helm package . --key "my-key" --keyring "/path/to/keyring.gpg"
Note: The package.key is used to specify the GPG key for signing Helm charts. This ensures the integrity and authenticity of the chart.

5. Setting Package Version

Property Value Description
version 1.2.3 Version of the chart, following semantic versioning
appVersion 2.0.0 Version of the application being packaged

Example: Setting version in Chart.yaml

apiVersion: v2
name: my-app
description: A Helm chart for my application
version: 1.2.3
appVersion: 2.0.0

6. Setting App Version

Field Description Example
appVersion Version of the application enclosed in the chart "1.2.3"

Example: Setting appVersion in Chart.yaml

apiVersion: v2
name: my-app
description: A Helm chart for my application
version: 1.0.0
appVersion: "1.2.3"

7. Updating Dependencies Before Packaging

Dependency Type Version Notes
chart.yaml metadata v2 Chart versioning schema
requirements.yaml dependencies v1 Legacy dependency management (deprecated)
Chart.lock lockfile v1 Locks resolved dependency versions

Example: Updating dependencies using Helm dependency plugin

helm dependency update
Note: The helm dependency update command reads from requirements.yaml and updates the Chart.lock file with resolved versions.
Warning: Helm v3+ no longer supports requirements.yaml. Use Chart.yaml with dependencies list instead.

Summary of Dependency Management

  • DEPRECATED requirements.yaml is replaced by Chart.yaml dependencies
  • Chart.lock ensures reproducible builds
  • Use helm dependency update to resolve and lock dependencies

8. Creating Package from Path

Example: Creating a Helm Package

helm package /path/to/chart/directory
Option Values Description
--destination string Directory to store the packaged chart
--app-version string Override app version in the chart
--version string Override chart version in the chart
--dependency-update bool Update dependencies before packaging
Note: The chart must have a valid Chart.yaml file to be packaged.

9. Verifying Package Contents

Example: Check chart contents

helm package my-chart
helm show chart my-chart-1.0.0.tgz
helm show values my-chart-1.0.0.tgz
helm show readme my-chart-1.0.0.tgz
Command Description Output
helm show chart Display the chart's Chart.yaml file contents Chart metadata (name, version, appVersion, etc.)
helm show values Display the chart's default values.yaml file contents Default configuration values
helm show readme Display the chart's README.md file contents Chart documentation and usage instructions
Note: Use helm package to create the chart archive before verifying its contents.

Example: Validate chart structure

helm template my-chart --debug
helm lint my-chart
Command Description Use Case
helm template Render templates to stdout (without installing) Debug and verify rendered output
helm lint Validate chart structure and syntax Check for common issues or errors in chart files

10. Generating Package Checksum

Field Description Value
checksum Checksum of the chart package sha256:abc123...

Example: Generating Checksum

helm package my-chart
sha256:abc123...

Was this article helpful?