浏览代码

Add common method to render GPU configuration

Waqar Ahmed 4 年之前
父节点
当前提交
b91bc88153
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      library/common/2101.0.0/templates/lib/containers/_resource.tpl

+ 10 - 0
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 -}}