brief-dawn-88958
03/17/2023, 10:02 AMyaml
# module..
variables:
memory-mb: 512
# k8s manifest
env:
- name: HEAP_OPTS
value: "-Xms${(var.memory-mb * 0.9) / 2}m -Xmx${var.memory-mb * 0.9}m"
Unfortunately, jvm doesn't take doubles, it wants ints.
The only way I could come up to solve this with the existing templating functions is this one:
split(string((var.memory-mb * 0.9) / 2), '.')[0]
-> Unable to parse as valid template string.
It doesn't work due to https://github.com/garden-io/garden/issues/3001.
A toInt
function would really come in handy here.
Am I missing something?quaint-dress-831
03/20/2023, 1:35 PMtoInt
function