Interview Prep/Helm/Values & Environments

Prod uses RDS while dev uses an in-cluster Postgres subchart. How do you configure the chart?

IntermediateScenarioValues & Environments
Answer

Situation read → Same app, different database source.

What I'd do →

  1. Dependency with condition: postgres.enabled; dev sets true, prod false.
  2. Add externalDatabase.host, port, existingSecret values for prod.
  3. A helper shop.dbHost returns the subchart Service name or the external host, and fails if neither is configured.
  4. Prod credentials come from an ExternalSecret referencing Secrets Manager.

Why → One chart, explicit switch, with a helper hiding the difference from templates.

Interview tip → Show the fail guard for the "nothing configured" case.

All Helm questions Roadmap: Helm

More on Values & Environments