Helm Values Formatter
Normalise values.yaml — consistent indentation, sorted keys, no tabs.
The file every chart argument is really about
A chart's values.yaml is its public interface. It is also,
typically, the least disciplined file in the repository: indentation drifts
as people add blocks, keys get added in whatever order they were thought
of, and after a few contributors the diff on any change touches more than
it should.
Tabs
YAML forbids tab characters for indentation, full stop. An editor configured to insert tabs produces a file that looks perfectly aligned and fails to parse with an error that points at the wrong place. Because the character is invisible, this can cost an afternoon. Tabs are found here and reported with their line number before anything else runs.
Duplicate keys
A duplicated key is legal enough for most parsers to accept — the last occurrence silently wins. In a 400-line values file assembled by several people, this is genuinely hard to spot by eye, and the symptom is a setting that visibly exists in the file and has no effect. Every duplicate is reported with both line numbers.
Quoting
The YAML type coercion rules bite hardest in Helm values, because so many values are version numbers and identifiers:
version: 1.10becomes the number 1.1 — the trailing zero is gone.enabled: nobecomes boolean false, which is usually intended, andcountry: NOalso becomes false, which is not.tag: 1.2.3is a string, buttag: 1.2is a number, so the same field changes type between releases.
Anything that would be re-read as the wrong type is quoted on output, which makes the file mean what it looks like it means.
Sorting is optional on purpose
Alphabetical keys make diffs stable and reviews faster, which is a real win on a large values file. But many charts group keys deliberately — image settings together, resources together — and sorting scatters that grouping. It is a toggle rather than a default because the right answer depends on the chart.
Local only
Values files contain registry credentials often enough that pasting one into a remote formatter is a genuine incident risk. Everything here runs in the page.