I defined the following parameters in values.yaml
resources:
nvidia.com/gpu: 1
and in templates, I'd like to add following logic in templates/deployment.yaml
{{- if .Values.resources.nvidia.com/gpu }}
****
{{- end}}
But it's failed, please help me to know how to use it in templates/deployment.yaml
.
You can always use the function index:
{{- if index .Values.resources "nvidia.com/gpu" }}
x: {{ index .Values.resources "nvidia.com/gpu" }}
{{- end}}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With