I have a chart for kafka, that has a pvc size defined in its values file like so: 20Gi
. I also have a configmap, that has a definition that it takes in bytes, like so: log.retention.bytes=21474836480
.
I'm trying to get my chart to use the same value defined in size
in the values file, in the configmap (hopefully, do some arithmetics on it before, like taking away a constant value to reserve some extra space)
I've been looking for a while to see if there is such a function built in to helm templates, or a way to create my own functions, with not much luck.
Ideally, I'm looking for something like this:
log.retention.bytes={{ .Values.persistence.size | convert-to-bytes | substract 10000 }}