Interview Prep/Helm/Values & Precedence

How does a parent chart pass values to a subchart?

BeginnerConceptValues & Precedence
Answer

Under a top-level key matching the subchart's name (or its alias):

# parent values.yaml
postgres:
  enabled: true
  auth:
    database: shop
    username: shop
  persistence:
    size: 5Gi

Inside the subchart those appear as .Values.auth.database etc. The parent can read them too (.Values.postgres.auth.database), which is handy for building connection strings.

All Helm questions Roadmap: Helm

More on Values & Precedence