deployment.yaml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. {{ include "common.deployment.common_config" . | nindent 0 }}
  2. spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
  3. template: {{ include "common.deployment.pod.metadata" . | nindent 4 }}
  4. spec:
  5. {{- if .Values.hostNetwork }}
  6. hostNetwork: {{ .Values.hostNetwork }}
  7. dnsPolicy: ClusterFirstWithHostNet
  8. {{- end }}
  9. containers:
  10. - name: {{ .Chart.Name }}
  11. {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
  12. {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }}
  13. {{ include "common.containers.gpuConfiguration" .Values | nindent 10 }}
  14. ports:
  15. - name: pms
  16. protocol: TCP
  17. containerPort: 32400
  18. {{- if .Values.hostNetwork }}
  19. hostPort: {{ .Values.plexServiceTCP.port }}
  20. {{- end }}
  21. - name: plex-dlna
  22. protocol: TCP
  23. containerPort: 32469
  24. - name: plex-dlna-udp
  25. protocol: UDP
  26. containerPort: 1900
  27. - name: plex-gdm1
  28. protocol: UDP
  29. containerPort: 32410
  30. - name: plex-gdm2
  31. protocol: UDP
  32. containerPort: 32412
  33. - name: plex-gdm3
  34. protocol: UDP
  35. containerPort: 32413
  36. - name: plex-gdm4
  37. protocol: UDP
  38. containerPort: 32414
  39. env:
  40. - name: KUBE_NAMESPACE
  41. valueFrom:
  42. fieldRef:
  43. fieldPath: metadata.namespace
  44. {{ $envList := (default list .Values.environmentVariables) }}
  45. {{ $envList = mustAppend $envList (dict "name" "TZ" "value" .Values.timezone) }}
  46. {{ $envList = mustAppend $envList (dict "name" "PLEX_CLAIM" "value" .Values.claimToken) }}
  47. {{ $envList = mustAppend $envList (dict "name" "PMS_INTERNAL_ADDRESS" "value" (printf "http://%s:32400" (include "common.names.fullname" .))) }}
  48. {{ $envList = mustAppend $envList (dict "name" "PMS_IMAGE" "value" (printf "%s:%s" .Values.image.repository .Values.image.tag))}}
  49. {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }}
  50. readinessProbe:
  51. httpGet:
  52. path: /identity
  53. port: 32400
  54. failureThreshold: 5
  55. periodSeconds: 15
  56. livenessProbe:
  57. httpGet:
  58. path: /identity
  59. port: 32400
  60. failureThreshold: 5
  61. periodSeconds: 15
  62. startupProbe:
  63. httpGet:
  64. path: /identity
  65. port: 32400
  66. initialDelaySeconds: 5
  67. failureThreshold: 40
  68. periodSeconds: 15
  69. {{ include "common.storage.allAppVolumes" .Values | nindent 6 }}