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
globaland each subchart's key, because Helm validates the parent schema against values that include them. - Users can no longer add arbitrary keys for
tpluse or vendor extensions. - Escape-hatch maps (
podAnnotations,extraEnv) needadditionalProperties: {"type": "string"}or no restriction.
We apply it to well-defined objects (image, probes, ingress) rather than the root.