mirror of
https://github.com/truenas/charts.git
synced 2026-11-14 06:48:09 +00:00
136 lines
4.0 KiB
YAML
136 lines
4.0 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "plex.fullname" . }}
|
|
labels:
|
|
{{- include "plex.labels" . | nindent 4 }}
|
|
spec:
|
|
replicas: 1
|
|
revisionHistoryLimit: 3
|
|
strategy:
|
|
type: {{ .Values.strategyType }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "plex.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "plex.selectorLabels" . | nindent 8 }}
|
|
annotations:
|
|
rollme: {{ randAlphaNum 5 | quote }}
|
|
spec:
|
|
{{- if .Values.hostNetwork }}
|
|
hostNetwork: {{ .Values.hostNetwork }}
|
|
dnsPolicy: ClusterFirstWithHostNet
|
|
{{- end }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
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: TZ
|
|
value: "{{ .Values.timezone }}"
|
|
# TODO: move this to a secret?
|
|
- name: PLEX_CLAIM
|
|
value: "{{ .Values.claimToken }}"
|
|
# plex env vars
|
|
- name: PMS_INTERNAL_ADDRESS
|
|
value: http://{{ template "plex.fullname" . }}:32400
|
|
- name: PMS_IMAGE
|
|
value: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
- name: KUBE_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
# Extra ENV Values supplied by user
|
|
{{- range $envVariable := .Values.environmentVariables }}
|
|
- name: {{ $envVariable.name }}
|
|
value: {{ $envVariable.value | quote }}
|
|
{{- end}}
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /identity
|
|
port: 32400
|
|
failureThreshold: 5
|
|
periodSeconds: 15
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /identity
|
|
port: 32400
|
|
failureThreshold: 5
|
|
periodSeconds: 15
|
|
startupProbe:
|
|
httpGet:
|
|
path: /identity
|
|
port: 32400
|
|
initialDelaySeconds: 5
|
|
failureThreshold: 40
|
|
periodSeconds: 15
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /data
|
|
- name: config
|
|
mountPath: /config
|
|
- name: transcode
|
|
mountPath: /transcode
|
|
- name: shared
|
|
mountPath: /shared
|
|
- name: shared-logs
|
|
mountPath: "/config/Library/Application Support/Plex Media Server/Logs"
|
|
{{- if .Values.gpuConfiguration }}
|
|
resources:
|
|
limits:
|
|
{{- toYaml .Values.gpuConfiguration | nindent 14 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: data
|
|
{{- if .Values.emptyDirVolumes }}
|
|
emptyDir: {}
|
|
{{- else }}
|
|
hostPath:
|
|
path: {{ template "configuredHostPathData" . }}
|
|
{{- end }}
|
|
- name: config
|
|
{{- if .Values.emptyDirVolumes }}
|
|
emptyDir: {}
|
|
{{- else }}
|
|
hostPath:
|
|
path: {{ template "configuredHostPathConfig" . }}
|
|
{{- end }}
|
|
- name: transcode
|
|
{{- if .Values.emptyDirVolumes }}
|
|
emptyDir: {}
|
|
{{- else }}
|
|
hostPath:
|
|
path: {{ template "configuredHostPathTranscode" . }}
|
|
{{- end }}
|
|
- name: shared
|
|
emptyDir: {}
|
|
- name: shared-logs
|
|
emptyDir: {}
|