apiVersion: apps/v1
kind: Deployment
metadata:
  name: jellyfin
  namespace: stack-arr
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jellyfin
  template:
    metadata:
      labels:
        app: jellyfin
    spec:
      imagePullSecrets:
      - name: regcred
      containers:
      - name: jellyfin
        image: lscr.io/linuxserver/jellyfin:10.11.5
        resources:
          limits:
            memory: "9G" # Maximum memory allowed
            cpu: "4" # Maximum CPU allowed
        securityContext:
          capabilities:
            add:
              - NET_ADMIN
        ports:
          - containerPort: 8096
            name: webui
          - containerPort: 8920
            name: webuihttps
          - containerPort: 1900
            name: dlnaudp
          - containerPort: 7359
            name: discoveryudp
        env:
        - name: PUID
          value: "1013"
        - name: PGID
          value: "1013"
        - name: TZ
          value: 'Etc/UTC'
        volumeMounts:
        - name: config
          mountPath: /config
        - name: videos
          mountPath: /videos
        - name: books
          mountPath: /books
      volumes:
      - name: config
        persistentVolumeClaim:
          claimName: jellyfin-config-pvc
      - name: videos
        persistentVolumeClaim:
          claimName: jellyfin-videos-pvc
      - name: books
        persistentVolumeClaim:
          claimName: jellyfin-books-pvc




