What is a typical "type coercion" bug with values, and how do you avoid it?
IntermediateConceptValues & Precedence
Answer
Examples:
tag: 1.10in YAML becomes1.1.--set enabled=falseis a boolean, but--set-string enabled=falseis the string"false", which is truthy inif.port: "3000"in values renders a quoted string intocontainerPort, causinginvalid type ... got "string", expected "integer".
Avoid with quoted strings for identifiers in values, int/toString conversions in templates, and values.schema.json declaring types so wrong types fail at install time.
More on Values & Precedence
What is the precedence order of values in Helm?BeginnerHow are lists merged across values files?IntermediateWhat is the difference between `--set` and `--set-string`?BeginnerHow do you set nested keys, list items and keys containing dots with `--set`?IntermediateWhat are `--set-file`, `--set-json` and `--set-literal` for?IntermediateHow do you remove a default value set in a chart's `values.yaml`?Intermediate