102 lines
2.0 KiB
YAML
102 lines
2.0 KiB
YAML
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:
|
|
hostNetwork: true
|
|
containers:
|
|
- name: plex
|
|
image: linuxserver/plex
|
|
ports:
|
|
- name: web
|
|
containerPort: 32400
|
|
env:
|
|
- name: VERSION
|
|
value: latest
|
|
volumeMounts:
|
|
- mountPath: /config
|
|
name: longhorn-plex-config
|
|
- mountPath: /data/series
|
|
name: flexvolsmb-pvr-series
|
|
- mountPath: /data/movies
|
|
name: flexvolsmb-pvr-movies
|
|
- mountPath: /transcode
|
|
name: emptydir-plex-transcode
|
|
volumes:
|
|
- name: longhorn-plex-config
|
|
persistentVolumeClaim:
|
|
claimName: longhorn-plex-config
|
|
- name: flexvolsmb-pvr-series
|
|
persistentVolumeClaim:
|
|
claimName: flexvolsmb-pvr-series
|
|
- name: flexvolsmb-pvr-movies
|
|
persistentVolumeClaim:
|
|
claimName: flexvolsmb-pvr-movies
|
|
- name: emptydir-plex-transcode
|
|
emptyDir:
|
|
medium: Memory
|
|
---
|
|
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:
|
|
name: longhorn-plex-config
|
|
namespace: pvr
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
storageClassName: longhorn
|
|
resources:
|
|
requests:
|
|
storage: 1Gi
|