Commit 27b8d54
committed
helm: fix dbStatementTimeout/dbPoolRecycle/dbPoolMaxOverflow silently dropped when set to 0
The webserver command template used `{{- with value }}` to include
--db-statement-timeout and related flags. Go's text/template treats the
integer 0 as falsy, so `with 0` is skipped entirely — preventing users
from disabling PostgreSQL's statement_timeout (which requires value 0).
Also, large integers such as 2147483647 were rendered in scientific
notation (2.147483647e+09) because Helm parses YAML integers as float64
and the default formatter switches to scientific notation past a
threshold.
Replace `with` with `if not (kindIs "invalid" ...)` to distinguish
between an unset (null) value and an explicitly provided zero. Pipe
the value through `int64` to guarantee decimal formatting for all
integer sizes.
Same fix applied to dbPoolRecycle and dbPoolMaxOverflow which have the
same pattern.
Fixes #338211 parent 6388276 commit 27b8d54
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
0 commit comments