Interview Prep/Helm/Values & Precedence

What are values "contracts" and why should you avoid exposing raw Kubernetes structures everywhere?

AdvancedConceptValues & Precedence
Answer

values.yaml is the chart's API. Passing raw blocks (resources, affinity, securityContext) through with toYaml is fine because they are well-known Kubernetes types. But if every field is a raw passthrough, the chart offers no guardrails and every consumer duplicates boilerplate.

Good charts offer opinionated, validated fields for the common path (api.port, api.replicas, ingress.host), raw passthrough for escape hatches (extraEnv, extraVolumes, podSpecOverrides), and a schema covering both.

All Helm questions Roadmap: Helm

More on Values & Precedence