helm chart to accept both Mi and Gi values

505 Views Asked by At

I have a helm chart and values file.

part of helm chart:
    - name: RAM
      value: "{{ .Values.resources.requests.memory | trimSuffix "Mi" }}"

here, how can i make it such that if I have values in Mi or Gi, both should get stripped. Also, if its Gi, appropriately convert that Gi(meaning GB's) .. multiply the value by 1000.

0

There are 0 best solutions below