Files
helm-charts/homeassistant
jklein d95e8569c8 homeassistant: render byte counts as plain decimals
Part of #157. The null-safe fallback helpers from #99 pass values through fromYaml, which parses every number as float64; Go's "%v" switches float64 to exponential notation from about 1e6 upwards. A bare byte count like 1048576 therefore reached multiplyQuantity as "1.048576e+06" and the render aborted on the suffix check.

This is the canonical correction already merged into the other charts, adopted verbatim with this chart's define prefix: multiplyQuantity formats its input and its non-integer product through a new formatNumber helper. The fromYaml round-trip itself is not touched - it is not the cause, and it has just been unified across all charts.

Measured against ci/homeassistant/test-values.yaml: resources.requests.memory=1048576 aborted before and now yields request 1048576 / limit "3145728"; 65536 still yields 196608. The silent variant matters here too - values.schema.json types resources.limitFactor as "number" with exclusiveMinimum 0, so a fractional factor is allowed and rendered an invalid quantity without any error (limitFactor 1.5 with memory 999999 produced memory: "1.4999985e+06"); it now produces 1499998.5.
2026-08-29 01:18:19 +02:00
..