-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplex.yaml
130 lines (129 loc) · 2.85 KB
/
plex.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
---
apiVersion: v1
kind: Namespace
metadata:
name: plex
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: plex
namespace: plex
spec:
strategy:
type: Recreate
selector:
matchLabels:
app: plex
replicas: 1
template:
metadata:
labels:
app: plex
annotations:
backup.velero.io/backup-volumes-excludes: media,media-metadata,tmpfs
spec:
containers:
- name: plex
image: linuxserver/plex:latest
imagePullPolicy: Always
# for debugging
# command: ["/bin/sh"]
# args: ["-c", "sleep 3600"]
ports:
- containerPort: 32400
name: http-web-svc
volumeMounts:
- mountPath: "/config"
name: config
- mountPath: "/config/Library/Application Support/Plex Media Server/Media"
name: media-metadata
- mountPath: "/media"
name: media
- mountPath: "/transcodes"
name: tmpfs
# Quicksync
- name: "render-device"
mountPath: "/dev/dri/renderD128"
env:
- name: PUID
value: "1000"
- name: PGID
value: "1000"
## NVIDIA
#- name: NVIDIA_DRIVER_CAPABILITIES
# value: "all"
# Quicksync
securityContext:
privileged: true
livenessProbe:
httpGet:
path: /web/index.html
port: 32400
failureThreshold: 5
initialDelaySeconds: 10
periodSeconds: 30
timeoutSeconds: 10
## NVIDIA
#resources:
# limits:
# nvidia.com/gpu: 1
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: gpu-node
operator: In
values:
- "true"
volumes:
- name: config
persistentVolumeClaim:
claimName: plex-config-pvc
- name: media-metadata
persistentVolumeClaim:
claimName: plex-metadata-pvc
- name: media
persistentVolumeClaim:
claimName: plex-pvc
readOnly: true
- name: tmpfs
emptyDir:
medium: Memory
sizeLimit: 12Gi
# Quicksync
- name: "render-device"
hostPath:
path: "/dev/dri/renderD128"
---
apiVersion: v1
kind: Service
metadata:
name: plex-service
namespace: plex
spec:
selector:
app: plex
type: ClusterIP
ports:
- name: plex-web-port
protocol: TCP
port: 32400
targetPort: http-web-svc
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: plex
namespace: plex
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`plex.jibby.org`)
services:
- kind: Service
name: plex-service
port: 32400