From 62a4d2c1cb3bf871523faf199673493885319a10 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Mon, 22 Mar 2021 00:02:03 +0500 Subject: [PATCH 1/3] Add GPU environment variable if gpu is specified --- test/plex/1.2.1/templates/deployment.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/plex/1.2.1/templates/deployment.yaml b/test/plex/1.2.1/templates/deployment.yaml index 15137b6c54..39cb835c47 100644 --- a/test/plex/1.2.1/templates/deployment.yaml +++ b/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" .))) }} From 9259ab860148a909396ba126529686235b1068c5 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Mon, 22 Mar 2021 00:02:25 +0500 Subject: [PATCH 2/3] Update plex version --- test/plex/{1.2.1 => 1.3.0}/.helmignore | 0 test/plex/{1.2.1 => 1.3.0}/Chart.lock | 0 test/plex/{1.2.1 => 1.3.0}/Chart.yaml | 0 test/plex/{1.2.1 => 1.3.0}/README.md | 0 test/plex/{1.2.1 => 1.3.0}/app-readme.md | 0 .../{1.2.1 => 1.3.0}/charts/common-2101.0.0.tgz | Bin test/plex/{1.2.1 => 1.3.0}/default_values.yaml | 0 test/plex/{1.2.1 => 1.3.0}/ix_values.yaml | 0 .../{1.2.1 => 1.3.0}/migrations/migrate_from_1.0.0 | 0 test/plex/{1.2.1 => 1.3.0}/questions.yaml | 0 test/plex/{1.2.1 => 1.3.0}/templates/NOTES.txt | 0 .../plex/{1.2.1 => 1.3.0}/templates/deployment.yaml | 0 .../{1.2.1 => 1.3.0}/templates/probe_config.yaml | 0 .../{1.2.1 => 1.3.0}/templates/service-tcp.yaml | 0 .../{1.2.1 => 1.3.0}/templates/service-udp.yaml | 0 test/plex/{1.2.1 => 1.3.0}/test_values.yaml | 0 test/plex/{1.2.1 => 1.3.0}/values.yaml | 0 17 files changed, 0 insertions(+), 0 deletions(-) rename test/plex/{1.2.1 => 1.3.0}/.helmignore (100%) rename test/plex/{1.2.1 => 1.3.0}/Chart.lock (100%) rename test/plex/{1.2.1 => 1.3.0}/Chart.yaml (100%) rename test/plex/{1.2.1 => 1.3.0}/README.md (100%) rename test/plex/{1.2.1 => 1.3.0}/app-readme.md (100%) rename test/plex/{1.2.1 => 1.3.0}/charts/common-2101.0.0.tgz (100%) rename test/plex/{1.2.1 => 1.3.0}/default_values.yaml (100%) rename test/plex/{1.2.1 => 1.3.0}/ix_values.yaml (100%) rename test/plex/{1.2.1 => 1.3.0}/migrations/migrate_from_1.0.0 (100%) rename test/plex/{1.2.1 => 1.3.0}/questions.yaml (100%) rename test/plex/{1.2.1 => 1.3.0}/templates/NOTES.txt (100%) rename test/plex/{1.2.1 => 1.3.0}/templates/deployment.yaml (100%) rename test/plex/{1.2.1 => 1.3.0}/templates/probe_config.yaml (100%) rename test/plex/{1.2.1 => 1.3.0}/templates/service-tcp.yaml (100%) rename test/plex/{1.2.1 => 1.3.0}/templates/service-udp.yaml (100%) rename test/plex/{1.2.1 => 1.3.0}/test_values.yaml (100%) rename test/plex/{1.2.1 => 1.3.0}/values.yaml (100%) diff --git a/test/plex/1.2.1/.helmignore b/test/plex/1.3.0/.helmignore similarity index 100% rename from test/plex/1.2.1/.helmignore rename to test/plex/1.3.0/.helmignore diff --git a/test/plex/1.2.1/Chart.lock b/test/plex/1.3.0/Chart.lock similarity index 100% rename from test/plex/1.2.1/Chart.lock rename to test/plex/1.3.0/Chart.lock diff --git a/test/plex/1.2.1/Chart.yaml b/test/plex/1.3.0/Chart.yaml similarity index 100% rename from test/plex/1.2.1/Chart.yaml rename to test/plex/1.3.0/Chart.yaml diff --git a/test/plex/1.2.1/README.md b/test/plex/1.3.0/README.md similarity index 100% rename from test/plex/1.2.1/README.md rename to test/plex/1.3.0/README.md diff --git a/test/plex/1.2.1/app-readme.md b/test/plex/1.3.0/app-readme.md similarity index 100% rename from test/plex/1.2.1/app-readme.md rename to test/plex/1.3.0/app-readme.md diff --git a/test/plex/1.2.1/charts/common-2101.0.0.tgz b/test/plex/1.3.0/charts/common-2101.0.0.tgz similarity index 100% rename from test/plex/1.2.1/charts/common-2101.0.0.tgz rename to test/plex/1.3.0/charts/common-2101.0.0.tgz diff --git a/test/plex/1.2.1/default_values.yaml b/test/plex/1.3.0/default_values.yaml similarity index 100% rename from test/plex/1.2.1/default_values.yaml rename to test/plex/1.3.0/default_values.yaml diff --git a/test/plex/1.2.1/ix_values.yaml b/test/plex/1.3.0/ix_values.yaml similarity index 100% rename from test/plex/1.2.1/ix_values.yaml rename to test/plex/1.3.0/ix_values.yaml diff --git a/test/plex/1.2.1/migrations/migrate_from_1.0.0 b/test/plex/1.3.0/migrations/migrate_from_1.0.0 similarity index 100% rename from test/plex/1.2.1/migrations/migrate_from_1.0.0 rename to test/plex/1.3.0/migrations/migrate_from_1.0.0 diff --git a/test/plex/1.2.1/questions.yaml b/test/plex/1.3.0/questions.yaml similarity index 100% rename from test/plex/1.2.1/questions.yaml rename to test/plex/1.3.0/questions.yaml diff --git a/test/plex/1.2.1/templates/NOTES.txt b/test/plex/1.3.0/templates/NOTES.txt similarity index 100% rename from test/plex/1.2.1/templates/NOTES.txt rename to test/plex/1.3.0/templates/NOTES.txt diff --git a/test/plex/1.2.1/templates/deployment.yaml b/test/plex/1.3.0/templates/deployment.yaml similarity index 100% rename from test/plex/1.2.1/templates/deployment.yaml rename to test/plex/1.3.0/templates/deployment.yaml diff --git a/test/plex/1.2.1/templates/probe_config.yaml b/test/plex/1.3.0/templates/probe_config.yaml similarity index 100% rename from test/plex/1.2.1/templates/probe_config.yaml rename to test/plex/1.3.0/templates/probe_config.yaml diff --git a/test/plex/1.2.1/templates/service-tcp.yaml b/test/plex/1.3.0/templates/service-tcp.yaml similarity index 100% rename from test/plex/1.2.1/templates/service-tcp.yaml rename to test/plex/1.3.0/templates/service-tcp.yaml diff --git a/test/plex/1.2.1/templates/service-udp.yaml b/test/plex/1.3.0/templates/service-udp.yaml similarity index 100% rename from test/plex/1.2.1/templates/service-udp.yaml rename to test/plex/1.3.0/templates/service-udp.yaml diff --git a/test/plex/1.2.1/test_values.yaml b/test/plex/1.3.0/test_values.yaml similarity index 100% rename from test/plex/1.2.1/test_values.yaml rename to test/plex/1.3.0/test_values.yaml diff --git a/test/plex/1.2.1/values.yaml b/test/plex/1.3.0/values.yaml similarity index 100% rename from test/plex/1.2.1/values.yaml rename to test/plex/1.3.0/values.yaml From 8093e932114ded2402d9dc9c155d05acb197e8ae Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Mon, 22 Mar 2021 00:15:59 +0500 Subject: [PATCH 3/3] Check if nvidia gpu is actually more then 1 --- test/plex/1.3.0/Chart.yaml | 2 +- test/plex/1.3.0/templates/deployment.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/plex/1.3.0/Chart.yaml b/test/plex/1.3.0/Chart.yaml index 379ec5930e..72a065cde2 100644 --- a/test/plex/1.3.0/Chart.yaml +++ b/test/plex/1.3.0/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 1.21.3.4046-3c1c83ba4 description: Plex Media Server name: plex -version: 1.2.1 +version: 1.3.0 keywords: - plex home: https://plex.tv/ diff --git a/test/plex/1.3.0/templates/deployment.yaml b/test/plex/1.3.0/templates/deployment.yaml index 39cb835c47..778a1db7ed 100644 --- a/test/plex/1.3.0/templates/deployment.yaml +++ b/test/plex/1.3.0/templates/deployment.yaml @@ -50,7 +50,7 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }} fieldRef: fieldPath: status.podIP {{ $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") }} {{ end }} {{ $envList = mustAppend $envList (dict "name" "TZ" "value" .Values.timezone) }}