Interview Prep/Helm/Dependencies, Subcharts & Library Charts

A subchart needs a password that the parent generates. How do you share it?

AdvancedScenarioDependencies, Subcharts & Library Charts
Answer

Situation read → Subcharts cannot see parent values, and generating it twice gives two different values.

What I'd do →

  1. Prefer an "existing secret" pattern: the parent (or an ExternalSecret) creates a Secret with a known name, and the subchart is configured with auth.existingSecret: shop-db.
  2. Or pass the same value explicitly to both: parent db.password and postgres.auth.password from one secrets file.
  3. Avoid randAlphaNum in both places.

Why → One Secret object, referenced by name, avoids duplication and drift.

Interview tip → "existingSecret" is the pattern most good charts support; mention it.

All Helm questions Roadmap: Helm

More on Dependencies, Subcharts & Library Charts