Browse Source

Add GPU environment variable if gpu is specified

Waqar Ahmed 4 years ago
parent
commit
62a4d2c1cb
1 changed files with 3 additions and 0 deletions
  1. 3 0
      test/plex/1.2.1/templates/deployment.yaml

+ 3 - 0
test/plex/1.2.1/templates/deployment.yaml

@@ -50,6 +50,9 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
                 fieldRef:
                   fieldPath: status.podIP
             {{ $envList := (default list .Values.environmentVariables) }}
+            {{ if .Values.gpuConfiguration }}
+            {{ $envList = mustAppend $envList (dict "name" "NVIDIA_DRIVER_CAPABILITIES" "value" "all") }}
+            {{ end }}
             {{ $envList = mustAppend $envList (dict "name" "TZ" "value" .Values.timezone) }}
             {{ $envList = mustAppend $envList (dict "name" "PLEX_CLAIM" "value" .Values.claimToken) }}
             {{ $envList = mustAppend $envList (dict "name" "PMS_INTERNAL_ADDRESS" "value" (printf "http://%s:32400" (include "common.names.fullname" .))) }}