Bläddra i källkod

Add common method to render GPU configuration

Waqar Ahmed 4 år sedan
förälder
incheckning
b91bc88153
1 ändrade filer med 10 tillägg och 0 borttagningar
  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 -}}