How does Helm treat a values key set to an empty string vs not set?
IntermediateConceptValues & Precedence
Answer
Both are "empty" for if, with, default and required. hasKey distinguishes them: an empty string is present, an absent key is not. In JSON Schema, minLength: 1 rejects the empty string, while required only checks presence. For a mandatory password, use both: schema required plus minLength, and template required as a safety net.
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