github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/llm-cluster/templates/validate.yaml (about)

     1  {{/*
     2  Validate cpu, memory and storage
     3  */}}
     4  {{- $cpu := (float64 .Values.cpu) }}
     5  {{- $memory := (float64 .Values.memory) }}
     6  {{- $storage := (float64 .Values.storage) }}
     7  {{- if or (lt $cpu 0.5) (gt $cpu 64.0) }}
     8  {{- fail (print "cpu must be between 0.5 and 64, got " $cpu) }}
     9  {{- end }}
    10  {{- if or (lt $memory 0.5) (gt $memory 1000.0) }}
    11  {{- fail (print "memory must be between 0.5 and 1000, got " $memory) }}
    12  {{- end }}