소스 검색

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 -}}