2023-06-17 04:47:17 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: server
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: jellyfin
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
strategy:
|
|
|
|
type: Recreate
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app.kubernetes.io/name: jellyfin
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: jellyfin
|
|
|
|
spec:
|
2023-06-19 22:15:39 +00:00
|
|
|
# securityContext:
|
|
|
|
# runAsUser: 33
|
|
|
|
# runAsGroup: 33
|
|
|
|
# fsGroup: 33
|
|
|
|
affinity:
|
|
|
|
nodeAffinity:
|
|
|
|
# TODO: eviction policy
|
|
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
|
|
nodeSelectorTerms:
|
|
|
|
- matchExpressions:
|
|
|
|
# we require to be scheduled on a raspberry pi for hardware transcoding to work
|
|
|
|
- key: kubernetes.io/arch
|
|
|
|
operator: In
|
|
|
|
values:
|
|
|
|
- arm64
|
2023-06-17 04:47:17 +00:00
|
|
|
containers:
|
|
|
|
- image: jellyfin/jellyfin
|
|
|
|
name: jellyfin
|
2023-06-19 22:15:39 +00:00
|
|
|
securityContext:
|
|
|
|
privileged: true # required for hardware transcode
|
2023-06-17 04:47:17 +00:00
|
|
|
env:
|
|
|
|
- name: JELLYFIN_PublishedServerUrl
|
|
|
|
value: ${JELLYFIN_EXTERNAL_URL}
|
|
|
|
- name: JELLYFIN_CONFIG_DIR
|
|
|
|
value: /config
|
|
|
|
- name: JELLYFIN_CACHE_DIR
|
|
|
|
value: /cache
|
|
|
|
ports:
|
|
|
|
- name: http
|
|
|
|
containerPort: 8096
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: 2000m
|
|
|
|
memory: 2Gi
|
|
|
|
limits:
|
|
|
|
cpu: 3500m
|
|
|
|
memory: 2Gi
|
|
|
|
volumeMounts:
|
|
|
|
- name: jellyfin-config-pvc
|
|
|
|
mountPath: /config
|
|
|
|
- name: jellyfin-cache-pvc
|
|
|
|
mountPath: /cache
|
2023-06-19 22:15:39 +00:00
|
|
|
- name: jellyfin-transcode
|
|
|
|
mountPath: /config/transcodes
|
|
|
|
# below mounts are for hardware transcode
|
|
|
|
- mountPath: /dev/video10
|
|
|
|
name: device-video10
|
|
|
|
- mountPath: /dev/video11
|
|
|
|
name: device-video11
|
|
|
|
- mountPath: /dev/video12
|
|
|
|
name: device-video12
|
2023-06-17 04:47:17 +00:00
|
|
|
volumes:
|
|
|
|
- name: jellyfin-config-pvc
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: jellyfin-config-pvc
|
|
|
|
- name: jellyfin-cache-pvc
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: jellyfin-cache-pvc
|
2023-06-19 22:15:39 +00:00
|
|
|
- name: jellyfin-transcode
|
|
|
|
emptyDir:
|
|
|
|
sizeLimit: 80Gi
|
|
|
|
- name: device-video10 #Only needed if you want to use your Raspberry Pi V4L2 video encoding.
|
|
|
|
hostPath:
|
|
|
|
path: /dev/video10
|
|
|
|
- name: device-video11 #Only needed if you want to use your Raspberry Pi V4L2 video encoding.
|
|
|
|
hostPath:
|
|
|
|
path: /dev/video11
|
|
|
|
- name: device-video12 #Only needed if you want to use your Raspberry Pi V4L2 video encoding.
|
|
|
|
hostPath:
|
2023-06-20 23:55:33 +00:00
|
|
|
path: /dev/video12
|
2023-06-17 04:47:17 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: PersistentVolumeClaim
|
|
|
|
metadata:
|
|
|
|
name: jellyfin-config-pvc
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: jellyfin
|
|
|
|
spec:
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteOnce
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 5Gi
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: PersistentVolumeClaim
|
|
|
|
metadata:
|
|
|
|
name: jellyfin-cache-pvc
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: jellyfin
|
|
|
|
spec:
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteOnce
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 5Gi
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: server
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: jellyfin
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app.kubernetes.io/name: jellyfin
|
|
|
|
ports:
|
|
|
|
- name: http
|
|
|
|
port: 80
|
|
|
|
targetPort: http
|