Anyone tried to make an arithmetic division in Helm?
According to sprig/Math Functions, the following should work:
{{ .Values.myvalue | div 2 }}
However, the result is wrong. e.g. 6/2 = 0
, 4/2 = 0
, 1/2 = 2
.
Any hint ?
You use the function the wrong way: See function declaration.
Your template should be:
{{ div .Values.myvalue 2 }}