浏览代码

Merge pull request #42 from truenas/NAS-109564

Update plex probes
Waqar Ahmed 4 年之前
父节点
当前提交
44c8f72cdb

+ 0 - 0
test/plex/1.1.1/.helmignore → test/plex/1.2.1/.helmignore


+ 0 - 0
test/plex/1.1.1/Chart.lock → test/plex/1.2.1/Chart.lock


+ 1 - 1
test/plex/1.1.1/Chart.yaml → test/plex/1.2.1/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.1.1
+version: 1.2.1
 keywords:
 keywords:
   - plex
   - plex
 home: https://plex.tv/
 home: https://plex.tv/

+ 0 - 0
test/plex/1.1.1/README.md → test/plex/1.2.1/README.md


+ 0 - 0
test/plex/1.1.1/app-readme.md → test/plex/1.2.1/app-readme.md


+ 0 - 0
test/plex/1.1.1/charts/common-2101.0.0.tgz → test/plex/1.2.1/charts/common-2101.0.0.tgz


+ 0 - 0
test/plex/1.1.1/default_values.yaml → test/plex/1.2.1/default_values.yaml


+ 0 - 0
test/plex/1.1.1/ix_values.yaml → test/plex/1.2.1/ix_values.yaml


+ 0 - 0
test/plex/1.1.1/migrations/migrate_from_1.0.0 → test/plex/1.2.1/migrations/migrate_from_1.0.0


+ 0 - 0
test/plex/1.1.1/questions.yaml → test/plex/1.2.1/questions.yaml


+ 0 - 0
test/plex/1.1.1/templates/NOTES.txt → test/plex/1.2.1/templates/NOTES.txt


+ 23 - 11
test/plex/1.1.1/templates/deployment.yaml → test/plex/1.2.1/templates/deployment.yaml

@@ -9,8 +9,12 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
       containers:
       containers:
         - name: {{ .Chart.Name }}
         - name: {{ .Chart.Name }}
           {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
           {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
-          {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }}
           {{ include "common.containers.gpuConfiguration" .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:
           ports:
           - name: pms
           - name: pms
             protocol: TCP
             protocol: TCP
@@ -41,6 +45,10 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
               valueFrom:
               valueFrom:
                 fieldRef:
                 fieldRef:
                   fieldPath: metadata.namespace
                   fieldPath: metadata.namespace
+            - name: POD_IP
+              valueFrom:
+                fieldRef:
+                  fieldPath: status.podIP
             {{ $envList := (default list .Values.environmentVariables) }}
             {{ $envList := (default list .Values.environmentVariables) }}
             {{ $envList = mustAppend $envList (dict "name" "TZ" "value" .Values.timezone) }}
             {{ $envList = mustAppend $envList (dict "name" "TZ" "value" .Values.timezone) }}
             {{ $envList = mustAppend $envList (dict "name" "PLEX_CLAIM" "value" .Values.claimToken) }}
             {{ $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))}}
             {{ $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 }}
             {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }}
           readinessProbe:
           readinessProbe:
-            httpGet:
-              path: /identity
-              port: 32400
+            exec:
+              command:
+                - /bin/plex_probe_check.sh
             failureThreshold: 5
             failureThreshold: 5
             periodSeconds: 15
             periodSeconds: 15
           livenessProbe:
           livenessProbe:
-            httpGet:
-              path: /identity
-              port: 32400
+            exec:
+              command:
+                - /bin/plex_probe_check.sh
             failureThreshold: 5
             failureThreshold: 5
             periodSeconds: 15
             periodSeconds: 15
           startupProbe:
           startupProbe:
-            httpGet:
-              path: /identity
-              port: 32400
+            exec:
+              command:
+                - /bin/plex_probe_check.sh
             initialDelaySeconds: 5
             initialDelaySeconds: 5
             failureThreshold: 40
             failureThreshold: 40
             periodSeconds: 15
             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"

+ 8 - 0
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

+ 0 - 0
test/plex/1.1.1/templates/service-tcp.yaml → test/plex/1.2.1/templates/service-tcp.yaml


+ 0 - 0
test/plex/1.1.1/templates/service-udp.yaml → test/plex/1.2.1/templates/service-udp.yaml


+ 0 - 0
test/plex/1.1.1/test_values.yaml → test/plex/1.2.1/test_values.yaml


+ 0 - 0
test/plex/1.1.1/values.yaml → test/plex/1.2.1/values.yaml