Interview Prep/Helm/Hooks, Tests & Validation

Can you use `additionalProperties: false` in a values schema? What is the catch?

AdvancedConceptHooks, Tests & Validation
Answer

Yes, and it catches misspelled keys (replicacount) that otherwise silently do nothing. The catches:

  • The top-level schema must allow global and each subchart's key, because Helm validates the parent schema against values that include them.
  • Users can no longer add arbitrary keys for tpl use or vendor extensions.
  • Escape-hatch maps (podAnnotations, extraEnv) need additionalProperties: {"type": "string"} or no restriction.

We apply it to well-defined objects (image, probes, ingress) rather than the root.

All Helm questions Roadmap: Helm

More on Hooks, Tests & Validation