Explorar el Código

Add common method to render GPU configuration

Waqar Ahmed hace 4 años
padre
commit
b91bc88153
Se han modificado 1 ficheros con 10 adiciones y 0 borrados
  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 -}}