From b91bc881535e5feebdbadd935976b432515834bd Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Wed, 3 Feb 2021 16:02:31 +0500 Subject: [PATCH] Add common method to render GPU configuration --- .../2101.0.0/templates/lib/containers/_resource.tpl | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 library/common/2101.0.0/templates/lib/containers/_resource.tpl diff --git a/library/common/2101.0.0/templates/lib/containers/_resource.tpl b/library/common/2101.0.0/templates/lib/containers/_resource.tpl new file mode 100644 index 0000000000..fd4f6eef02 --- /dev/null +++ b/library/common/2101.0.0/templates/lib/containers/_resource.tpl @@ -0,0 +1,10 @@ +{{/* +Retrieve GPU Configuration +*/}} +{{- define "common.containers.gpuConfiguration" -}} +{{- $values := . -}} +{{ if $values.gpuConfiguration }} +resources: + limits: {{- toYaml $values.gpuConfiguration | nindent 4 }} +{{ end }} +{{- end -}}