Kubernetes.K3s.installLog/services/PVR/deploy-Plex.yml

109 lines
2.3 KiB
YAML
Raw Normal View History

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
2020-12-08 07:54:12 +00:00
strategy:
type: Recreate
template:
metadata:
labels:
app: plex
spec:
hostNetwork: true
containers:
- name: plex
image: bv11-cr01.bessems.eu/proxy/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
2020-12-15 18:54:02 +00:00
- mountPath: /data/songs
name: flexvolsmb-pvr-songs
- 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
2020-12-15 18:54:02 +00:00
- name: flexvolsmb-pvr-songs
persistentVolumeClaim:
claimName: flexvolsmb-pvr-songs
- 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:
2020-12-15 18:54:02 +00:00
storage: 5Gi