2020-11-04 12:11:47 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: plex
|
|
|
|
namespace: pvr
|
|
|
|
spec:
|
|
|
|
ports:
|
|
|
|
- protocol: TCP
|
|
|
|
name: web
|
|
|
|
port: 32400
|
|
|
|
selector:
|
|
|
|
app: plex
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: plex
|
|
|
|
namespace: pvr
|
|
|
|
labels:
|
|
|
|
app: plex
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: plex
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: plex
|
|
|
|
spec:
|
2020-11-15 16:16:43 +00:00
|
|
|
hostNetwork: true
|
2020-11-04 12:11:47 +00:00
|
|
|
containers:
|
|
|
|
- name: plex
|
2020-11-15 16:16:43 +00:00
|
|
|
image: linuxserver/plex
|
2020-11-04 12:11:47 +00:00
|
|
|
ports:
|
|
|
|
- name: web
|
|
|
|
containerPort: 32400
|
|
|
|
env:
|
|
|
|
- name: VERSION
|
|
|
|
value: latest
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /config
|
2020-11-15 16:16:43 +00:00
|
|
|
name: longhorn-plex-config
|
2020-11-04 12:11:47 +00:00
|
|
|
- mountPath: /data/series
|
|
|
|
name: flexvolsmb-pvr-series
|
|
|
|
- mountPath: /data/movies
|
|
|
|
name: flexvolsmb-pvr-movies
|
2020-11-23 12:19:31 +00:00
|
|
|
- mountPath: /transcode
|
|
|
|
name: emptydir-plex-transcode
|
2020-11-04 12:11:47 +00:00
|
|
|
volumes:
|
2020-11-15 16:16:43 +00:00
|
|
|
- name: longhorn-plex-config
|
2020-11-04 12:11:47 +00:00
|
|
|
persistentVolumeClaim:
|
2020-11-15 16:16:43 +00:00
|
|
|
claimName: longhorn-plex-config
|
2020-11-04 12:11:47 +00:00
|
|
|
- name: flexvolsmb-pvr-series
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: flexvolsmb-pvr-series
|
|
|
|
- name: flexvolsmb-pvr-movies
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: flexvolsmb-pvr-movies
|
2020-11-23 12:19:31 +00:00
|
|
|
- name: emptydir-plex-transcode
|
|
|
|
emptyDir:
|
|
|
|
medium: Memory
|
2020-11-04 12:11:47 +00:00
|
|
|
---
|
|
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
|
|
kind: IngressRoute
|
|
|
|
metadata:
|
|
|
|
name: plex
|
|
|
|
namespace: pvr
|
|
|
|
spec:
|
|
|
|
entryPoints:
|
|
|
|
- websecure
|
|
|
|
routes:
|
|
|
|
- match: Host(`media.pvr.spamasaurus.com`)
|
|
|
|
kind: Rule
|
|
|
|
services:
|
|
|
|
- name: plex
|
|
|
|
port: 32400
|
|
|
|
middlewares:
|
|
|
|
- name: security-headers@file
|
|
|
|
- name: compression@file
|
|
|
|
tls:
|
|
|
|
options:
|
|
|
|
name: defaults@file
|
|
|
|
certResolver: default
|
|
|
|
domains:
|
|
|
|
- main: '*.pvr.spamasaurus.com'
|
|
|
|
sans:
|
|
|
|
- 'pvr.spamasaurus.com'
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: PersistentVolumeClaim
|
|
|
|
metadata:
|
2020-11-15 16:16:43 +00:00
|
|
|
name: longhorn-plex-config
|
2020-11-04 12:11:47 +00:00
|
|
|
namespace: pvr
|
|
|
|
spec:
|
|
|
|
accessModes:
|
2020-11-15 16:16:43 +00:00
|
|
|
- ReadWriteOnce
|
|
|
|
storageClassName: longhorn
|
2020-11-04 12:11:47 +00:00
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 1Gi
|