From a84f02f711443cc9eb7951b9ed80208772b8b15f Mon Sep 17 00:00:00 2001 From: aggarwalakshun Date: Wed, 16 Apr 2025 01:07:07 +0530 Subject: [PATCH] feat: add jellyfin deployment, service, and persistent volume claims --- cluster/apps/jellyfin/jellyfin-pvc.yml | 27 ++++++++++++ cluster/apps/jellyfin/jellyfin-svc.yml | 16 ++++++++ cluster/apps/jellyfin/jellyfin.yml | 57 ++++++++++++++++++++++++++ 3 files changed, 100 insertions(+) create mode 100644 cluster/apps/jellyfin/jellyfin-pvc.yml create mode 100644 cluster/apps/jellyfin/jellyfin-svc.yml create mode 100644 cluster/apps/jellyfin/jellyfin.yml diff --git a/cluster/apps/jellyfin/jellyfin-pvc.yml b/cluster/apps/jellyfin/jellyfin-pvc.yml new file mode 100644 index 0000000..d06163e --- /dev/null +++ b/cluster/apps/jellyfin/jellyfin-pvc.yml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: longhorn-jellyfin-cache + namespace: default +spec: + accessModes: + - ReadWriteMany + storageClassName: longhorn + resources: + requests: + storage: 20Gi + +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: longhorn-jellyfin-config + namespace: default +spec: + accessModes: + - ReadWriteMany + storageClassName: longhorn + resources: + requests: + storage: 20Gi diff --git a/cluster/apps/jellyfin/jellyfin-svc.yml b/cluster/apps/jellyfin/jellyfin-svc.yml new file mode 100644 index 0000000..66b996d --- /dev/null +++ b/cluster/apps/jellyfin/jellyfin-svc.yml @@ -0,0 +1,16 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: jellyfin-service + namespace: default +spec: + type: NodePort + selector: + app: jellyfin + ports: + - port: 8096 + targetPort: 8096 + nodePort: 8096 + protocol: TCP + diff --git a/cluster/apps/jellyfin/jellyfin.yml b/cluster/apps/jellyfin/jellyfin.yml new file mode 100644 index 0000000..cab0ee8 --- /dev/null +++ b/cluster/apps/jellyfin/jellyfin.yml @@ -0,0 +1,57 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: jellyfin + namespace: default +spec: + replicas: 1 + selector: + matchLabels: + app: jellyfin + template: + metadata: + labels: + app: jellyfin + spec: + securityContext: + runAsGroup: 1000 + runAsUser: 1000 + supplementalGroups: + - 128 + - 226 + - 106 + - 44 + - 104 + nodeSelector: + type: jellyfin + containers: + - name: jellyfin + image: jellyfin/jellyfin:10.10.7 + ports: + - containerPort: 8096 + volumeMounts: + - name: media + mountPath: /media + - name: config + mountPath: /config + - name: cache + mountPath: /cache + - name: card + mountPath: /dev/dri/renderD128 + securityContext: + privileged: true + volumes: + - name: config + persistentVolumeClaim: + claimName: longhorn-jellyfin-config + - name: cache + persistentVolumeClaim: + claimName: longhorn-jellyfin-cache + - name: media + nfs: + server: 10.0.0.123 + path: /merge + - name: card + persistentVolumeClaim: + claimName: jellyfin-intel-pvc