Course contentsShow
← Cloud and Infrastructure
Lesson 1552 of 2,98931. Helm Package ManagerFree lesson

Chart Dependencies and Requirements

Manage chart dependencies, define requirements, and control how subcharts are included and configured.

Chart Dependencies and Requirements

You'll learn how to declare and manage external charts your Helm chart depends on, ensuring subcharts install together and stay synchronized.

What Are Chart Dependencies?

Think of chart dependencies like recipe ingredients that are themselves full recipes. When you bake a fancy dessert, you might need chocolate ganache (one recipe) and vanilla custard (another recipe) as components. Similarly, a Helm chart for a web application might depend on separate charts for Redis, PostgreSQL, or monitoring tools.

Instead of bundling everything into one massive chart, you declare dependencies in Chart.yaml. Helm automatically downloads and manages these subchart packages during installation.

Defining Dependencies in Chart.yaml

You declare dependencies using a dependencies section:

# Chart.yaml
dependencies:
  - name: redis
    version: "17.3.7"
    repository: "https://charts.bitnami.com/bitnami"
  - name: postgresql
    version: "12.1.2"
    repository: "https://charts.bitnami.com/bitnami"
    condition: postgresql.enabled

Each dependency specifies:

  • name: The chart name
  • version: Exact or semver-compatible version
  • repository: Where to fetch it
  • condition (optional): Enable/disable via values

Managing Dependencies

After defining dependencies, run:

helm dependency update ./mychart

This downloads dependencies into the charts/ directory as .tgz archives.

Controlling Subchart Configuration

Override subchart values through parent values.yaml:

# Parent values.yaml
redis:
  auth:
    enabled: false
postgresql:
  enabled: true
  postgresqlPassword: "secretpass"

The parent chart controls whether dependencies install and how they're configured—crucial for environment-specific deployments.

Key Takeaway: Chart dependencies let you compose complex applications from reusable components, declared in Chart.yaml and managed with helm dependency update, while parent values control subchart behavior and inclusion.