$ helm version
version.BuildInfo{Version:"v3.3.0", GitCommit:"8a4aeec08d67a7b84472007529e8097ec3742105", GitTreeState:"dirty", GoVersion:"go1.14.6"}
So I have my template:
minAvailable: {{ mul .Values.autoscaling.minReplicas 0.75 }}
values.yaml:
autoscaling:
minReplicas: 3
I would have expected a rendered output of 2.25
, but I get 0 (3 * 0
because 0.75
gets floored...)
I've tried things like
minAvailable: {{ mul (float .Values.autoscaling.minReplicas) 0.75 }}
Ultimately I'm going to floor
the value to get back to an int...
minAvailable: {{ floor ( mul .Values.autoscaling.minReplicas 0.75 ) }}
But I just don't understand why I can't seem to do simple float arithmetic
Other things I've tried
minAvailable: {{ float64 .Values.autoscaling.minReplicas }}
minAvailable: {{ float64 .Values.autoscaling.minReplicas | toString }}
nothing produces a float number....
I've even tried doing this in values.yaml
autoscaling:
minReplicas: 3.0