Browse Source

Check if nvidia gpu is actually more then 1

Waqar Ahmed 4 years ago
parent
commit
8093e93211
2 changed files with 2 additions and 2 deletions
  1. 1 1
      test/plex/1.3.0/Chart.yaml
  2. 1 1
      test/plex/1.3.0/templates/deployment.yaml

+ 1 - 1
test/plex/1.3.0/Chart.yaml

@@ -2,7 +2,7 @@ apiVersion: v2
 appVersion: 1.21.3.4046-3c1c83ba4
 appVersion: 1.21.3.4046-3c1c83ba4
 description: Plex Media Server
 description: Plex Media Server
 name: plex
 name: plex
-version: 1.2.1
+version: 1.3.0
 keywords:
 keywords:
   - plex
   - plex
 home: https://plex.tv/
 home: https://plex.tv/

+ 1 - 1
test/plex/1.3.0/templates/deployment.yaml

@@ -50,7 +50,7 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
                 fieldRef:
                 fieldRef:
                   fieldPath: status.podIP
                   fieldPath: status.podIP
             {{ $envList := (default list .Values.environmentVariables) }}
             {{ $envList := (default list .Values.environmentVariables) }}
-            {{ if .Values.gpuConfiguration }}
+            {{ if and .Values.gpuConfiguration (hasKey .Values.gpuConfiguration "nvidia.com/gpu") (gt (get .Values.gpuConfiguration "nvidia.com/gpu" | toDecimal) 0) }}
             {{ $envList = mustAppend $envList (dict "name" "NVIDIA_DRIVER_CAPABILITIES" "value" "all") }}
             {{ $envList = mustAppend $envList (dict "name" "NVIDIA_DRIVER_CAPABILITIES" "value" "all") }}
             {{ end }}
             {{ end }}
             {{ $envList = mustAppend $envList (dict "name" "TZ" "value" .Values.timezone) }}
             {{ $envList = mustAppend $envList (dict "name" "TZ" "value" .Values.timezone) }}