From 669153a84b907cc85520b89d8d4f57e64f6a6a1c Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Thu, 18 Mar 2021 22:55:26 +0500 Subject: [PATCH 1/3] Update plex chart version --- test/plex/{1.1.1 => 1.2.1}/.helmignore | 0 test/plex/{1.1.1 => 1.2.1}/Chart.lock | 0 test/plex/{1.1.1 => 1.2.1}/Chart.yaml | 2 +- test/plex/{1.1.1 => 1.2.1}/README.md | 0 test/plex/{1.1.1 => 1.2.1}/app-readme.md | 0 .../{1.1.1 => 1.2.1}/charts/common-2101.0.0.tgz | Bin test/plex/{1.1.1 => 1.2.1}/default_values.yaml | 0 test/plex/{1.1.1 => 1.2.1}/ix_values.yaml | 0 .../{1.1.1 => 1.2.1}/migrations/migrate_from_1.0.0 | 0 test/plex/{1.1.1 => 1.2.1}/questions.yaml | 0 test/plex/{1.1.1 => 1.2.1}/templates/NOTES.txt | 0 .../plex/{1.1.1 => 1.2.1}/templates/deployment.yaml | 0 .../{1.1.1 => 1.2.1}/templates/service-tcp.yaml | 0 .../{1.1.1 => 1.2.1}/templates/service-udp.yaml | 0 test/plex/{1.1.1 => 1.2.1}/test_values.yaml | 0 test/plex/{1.1.1 => 1.2.1}/values.yaml | 0 16 files changed, 1 insertion(+), 1 deletion(-) rename test/plex/{1.1.1 => 1.2.1}/.helmignore (100%) rename test/plex/{1.1.1 => 1.2.1}/Chart.lock (100%) rename test/plex/{1.1.1 => 1.2.1}/Chart.yaml (96%) rename test/plex/{1.1.1 => 1.2.1}/README.md (100%) rename test/plex/{1.1.1 => 1.2.1}/app-readme.md (100%) rename test/plex/{1.1.1 => 1.2.1}/charts/common-2101.0.0.tgz (100%) rename test/plex/{1.1.1 => 1.2.1}/default_values.yaml (100%) rename test/plex/{1.1.1 => 1.2.1}/ix_values.yaml (100%) rename test/plex/{1.1.1 => 1.2.1}/migrations/migrate_from_1.0.0 (100%) rename test/plex/{1.1.1 => 1.2.1}/questions.yaml (100%) rename test/plex/{1.1.1 => 1.2.1}/templates/NOTES.txt (100%) rename test/plex/{1.1.1 => 1.2.1}/templates/deployment.yaml (100%) rename test/plex/{1.1.1 => 1.2.1}/templates/service-tcp.yaml (100%) rename test/plex/{1.1.1 => 1.2.1}/templates/service-udp.yaml (100%) rename test/plex/{1.1.1 => 1.2.1}/test_values.yaml (100%) rename test/plex/{1.1.1 => 1.2.1}/values.yaml (100%) diff --git a/test/plex/1.1.1/.helmignore b/test/plex/1.2.1/.helmignore similarity index 100% rename from test/plex/1.1.1/.helmignore rename to test/plex/1.2.1/.helmignore diff --git a/test/plex/1.1.1/Chart.lock b/test/plex/1.2.1/Chart.lock similarity index 100% rename from test/plex/1.1.1/Chart.lock rename to test/plex/1.2.1/Chart.lock diff --git a/test/plex/1.1.1/Chart.yaml b/test/plex/1.2.1/Chart.yaml similarity index 96% rename from test/plex/1.1.1/Chart.yaml rename to test/plex/1.2.1/Chart.yaml index d7567761..379ec593 100644 --- a/test/plex/1.1.1/Chart.yaml +++ b/test/plex/1.2.1/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 1.21.3.4046-3c1c83ba4 description: Plex Media Server name: plex -version: 1.1.1 +version: 1.2.1 keywords: - plex home: https://plex.tv/ diff --git a/test/plex/1.1.1/README.md b/test/plex/1.2.1/README.md similarity index 100% rename from test/plex/1.1.1/README.md rename to test/plex/1.2.1/README.md diff --git a/test/plex/1.1.1/app-readme.md b/test/plex/1.2.1/app-readme.md similarity index 100% rename from test/plex/1.1.1/app-readme.md rename to test/plex/1.2.1/app-readme.md diff --git a/test/plex/1.1.1/charts/common-2101.0.0.tgz b/test/plex/1.2.1/charts/common-2101.0.0.tgz similarity index 100% rename from test/plex/1.1.1/charts/common-2101.0.0.tgz rename to test/plex/1.2.1/charts/common-2101.0.0.tgz diff --git a/test/plex/1.1.1/default_values.yaml b/test/plex/1.2.1/default_values.yaml similarity index 100% rename from test/plex/1.1.1/default_values.yaml rename to test/plex/1.2.1/default_values.yaml diff --git a/test/plex/1.1.1/ix_values.yaml b/test/plex/1.2.1/ix_values.yaml similarity index 100% rename from test/plex/1.1.1/ix_values.yaml rename to test/plex/1.2.1/ix_values.yaml diff --git a/test/plex/1.1.1/migrations/migrate_from_1.0.0 b/test/plex/1.2.1/migrations/migrate_from_1.0.0 similarity index 100% rename from test/plex/1.1.1/migrations/migrate_from_1.0.0 rename to test/plex/1.2.1/migrations/migrate_from_1.0.0 diff --git a/test/plex/1.1.1/questions.yaml b/test/plex/1.2.1/questions.yaml similarity index 100% rename from test/plex/1.1.1/questions.yaml rename to test/plex/1.2.1/questions.yaml diff --git a/test/plex/1.1.1/templates/NOTES.txt b/test/plex/1.2.1/templates/NOTES.txt similarity index 100% rename from test/plex/1.1.1/templates/NOTES.txt rename to test/plex/1.2.1/templates/NOTES.txt diff --git a/test/plex/1.1.1/templates/deployment.yaml b/test/plex/1.2.1/templates/deployment.yaml similarity index 100% rename from test/plex/1.1.1/templates/deployment.yaml rename to test/plex/1.2.1/templates/deployment.yaml diff --git a/test/plex/1.1.1/templates/service-tcp.yaml b/test/plex/1.2.1/templates/service-tcp.yaml similarity index 100% rename from test/plex/1.1.1/templates/service-tcp.yaml rename to test/plex/1.2.1/templates/service-tcp.yaml diff --git a/test/plex/1.1.1/templates/service-udp.yaml b/test/plex/1.2.1/templates/service-udp.yaml similarity index 100% rename from test/plex/1.1.1/templates/service-udp.yaml rename to test/plex/1.2.1/templates/service-udp.yaml diff --git a/test/plex/1.1.1/test_values.yaml b/test/plex/1.2.1/test_values.yaml similarity index 100% rename from test/plex/1.1.1/test_values.yaml rename to test/plex/1.2.1/test_values.yaml diff --git a/test/plex/1.1.1/values.yaml b/test/plex/1.2.1/values.yaml similarity index 100% rename from test/plex/1.1.1/values.yaml rename to test/plex/1.2.1/values.yaml From 01a18700292d80e1cf4e383d0b4379ab6e158806 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Thu, 18 Mar 2021 23:02:44 +0500 Subject: [PATCH 2/3] Add script to verify if plex is working nicely --- test/plex/1.2.1/templates/probe_config.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/plex/1.2.1/templates/probe_config.yaml diff --git a/test/plex/1.2.1/templates/probe_config.yaml b/test/plex/1.2.1/templates/probe_config.yaml new file mode 100644 index 00000000..736ee8cf --- /dev/null +++ b/test/plex/1.2.1/templates/probe_config.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: "plex-probe-check" +data: + entrypoint.sh: |- + #!/bin/sh + curl -ksf http://$POD_IP:32400/identity -o /dev/null || curl -ksf https://$POD_IP:32400/identity -o /dev/null From a2f781276ce8caa5a0666755a80d323c61b2e8ab Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Thu, 18 Mar 2021 23:32:11 +0500 Subject: [PATCH 3/3] Update plex probes --- test/plex/1.2.1/templates/deployment.yaml | 34 +++++++++++++++-------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/test/plex/1.2.1/templates/deployment.yaml b/test/plex/1.2.1/templates/deployment.yaml index 6f3283aa..15137b6c 100644 --- a/test/plex/1.2.1/templates/deployment.yaml +++ b/test/plex/1.2.1/templates/deployment.yaml @@ -9,8 +9,12 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }} containers: - name: {{ .Chart.Name }} {{ include "common.containers.imageConfig" .Values.image | nindent 10 }} - {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }} {{ include "common.containers.gpuConfiguration" .Values | nindent 10 }} + volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }} + - name: plex-probe-check + mountPath: /bin/plex_probe_check.sh + readOnly: true + subPath: entrypoint.sh ports: - name: pms protocol: TCP @@ -41,6 +45,10 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }} valueFrom: fieldRef: fieldPath: metadata.namespace + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP {{ $envList := (default list .Values.environmentVariables) }} {{ $envList = mustAppend $envList (dict "name" "TZ" "value" .Values.timezone) }} {{ $envList = mustAppend $envList (dict "name" "PLEX_CLAIM" "value" .Values.claimToken) }} @@ -48,22 +56,26 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }} {{ $envList = mustAppend $envList (dict "name" "PMS_IMAGE" "value" (printf "%s:%s" .Values.image.repository .Values.image.tag))}} {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }} readinessProbe: - httpGet: - path: /identity - port: 32400 + exec: + command: + - /bin/plex_probe_check.sh failureThreshold: 5 periodSeconds: 15 livenessProbe: - httpGet: - path: /identity - port: 32400 + exec: + command: + - /bin/plex_probe_check.sh failureThreshold: 5 periodSeconds: 15 startupProbe: - httpGet: - path: /identity - port: 32400 + exec: + command: + - /bin/plex_probe_check.sh initialDelaySeconds: 5 failureThreshold: 40 periodSeconds: 15 -{{ include "common.storage.allAppVolumes" .Values | nindent 6 }} + volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }} + - name: plex-probe-check + configMap: + defaultMode: 0700 + name: "plex-probe-check"