123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- {{ include "common.deployment.common_config" . | nindent 0 }}
- spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
- template: {{ include "common.deployment.pod.metadata" . | nindent 4 }}
- spec:
- {{- if .Values.hostNetwork }}
- hostNetwork: {{ .Values.hostNetwork }}
- dnsPolicy: ClusterFirstWithHostNet
- {{- end }}
- hostname: {{ template "common.names.fullname" . }}
- containers:
- - name: {{ .Chart.Name }}
- {{ if .Values.enablePlexPass }}
- {{ include "common.containers.imageConfig" .Values.plexpassImage | nindent 10 }}
- {{ else }}
- {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
- {{ end }}
- {{ 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
- {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
- - name: extrappvolume-{{ $index }}
- mountPath: {{ $hostPathConfiguration.mountPath }}
- {{ if $hostPathConfiguration.readOnly }}
- readOnly: {{ $hostPathConfiguration.readOnly }}
- {{ end }}
- {{ end }}
- ports:
- - name: pms
- protocol: TCP
- containerPort: 32400
- {{- if .Values.hostNetwork }}
- hostPort: {{ .Values.plexServiceTCP.port }}
- {{- end }}
- - name: plex-dlna
- protocol: TCP
- containerPort: 32469
- - name: plex-dlna-udp
- protocol: UDP
- containerPort: 1900
- - name: plex-gdm1
- protocol: UDP
- containerPort: 32410
- - name: plex-gdm2
- protocol: UDP
- containerPort: 32412
- - name: plex-gdm3
- protocol: UDP
- containerPort: 32413
- - name: plex-gdm4
- protocol: UDP
- containerPort: 32414
- env:
- - name: KUBE_NAMESPACE
- valueFrom:
- fieldRef:
- fieldPath: metadata.namespace
- - name: POD_IP
- valueFrom:
- fieldRef:
- fieldPath: status.podIP
- {{ $envList := (default list .Values.environmentVariables) }}
- {{ 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) }}
- {{ $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" .))) }}
- {{ $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:
- exec:
- command:
- - /bin/plex_probe_check.sh
- failureThreshold: 5
- periodSeconds: 15
- livenessProbe:
- exec:
- command:
- - /bin/plex_probe_check.sh
- failureThreshold: 5
- periodSeconds: 15
- startupProbe:
- exec:
- command:
- - /bin/plex_probe_check.sh
- initialDelaySeconds: 5
- failureThreshold: 40
- periodSeconds: 15
- {{ include "common.networking.dnsConfiguration" .Values | nindent 6 }}
- volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
- - name: plex-probe-check
- configMap:
- defaultMode: 0700
- name: "plex-probe-check"
- {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
- - name: extrappvolume-{{ $index }}
- hostPath:
- path: {{ $hostPathConfiguration.hostPath }}
- {{ end }}
|