jellyfin.yaml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. ---
  2. apiVersion: v1
  3. kind: Namespace
  4. metadata:
  5. name: plex
  6. ---
  7. apiVersion: apps/v1
  8. kind: Deployment
  9. metadata:
  10. name: jellyfin
  11. namespace: plex
  12. spec:
  13. strategy:
  14. type: Recreate
  15. selector:
  16. matchLabels:
  17. app: jellyfin
  18. replicas: 1
  19. template:
  20. metadata:
  21. labels:
  22. app: jellyfin
  23. annotations:
  24. backup.velero.io/backup-volumes-excludes: media,tmpfs
  25. spec:
  26. containers:
  27. - name: jellyfin
  28. #image: jellyfin/jellyfin:latest
  29. image: dfrgu/jellyfin-jemalloc:latest
  30. imagePullPolicy: Always
  31. ports:
  32. - containerPort: 8096
  33. name: http-web-svc
  34. volumeMounts:
  35. - mountPath: "/config"
  36. name: config
  37. - mountPath: "/media"
  38. name: media
  39. - mountPath: "/transcodes"
  40. name: tmpfs
  41. # Quicksync
  42. - name: "render-device"
  43. mountPath: "/dev/dri/renderD128"
  44. env:
  45. - name: PUID
  46. value: "1000"
  47. - name: PGID
  48. value: "1000"
  49. - name: "MALLOC_TRIM_THRESHOLD_"
  50. value: "131072"
  51. ## NVIDIA
  52. #- name: NVIDIA_DRIVER_CAPABILITIES
  53. # value: "all"
  54. # Quicksync
  55. securityContext:
  56. privileged: true
  57. livenessProbe:
  58. httpGet:
  59. path: /web/index.html
  60. port: 8096
  61. failureThreshold: 5
  62. initialDelaySeconds: 10
  63. periodSeconds: 30
  64. timeoutSeconds: 10
  65. ## NVIDIA
  66. #resources:
  67. # limits:
  68. # nvidia.com/gpu: 1
  69. resources:
  70. requests:
  71. memory: "0"
  72. limits:
  73. memory: "4Gi"
  74. affinity:
  75. nodeAffinity:
  76. requiredDuringSchedulingIgnoredDuringExecution:
  77. nodeSelectorTerms:
  78. - matchExpressions:
  79. - key: gpu-node
  80. operator: In
  81. values:
  82. - "true"
  83. volumes:
  84. - name: config
  85. persistentVolumeClaim:
  86. claimName: jellyfin-config-pvc
  87. - name: media
  88. persistentVolumeClaim:
  89. claimName: media2-pvc
  90. - name: tmpfs
  91. emptyDir:
  92. medium: Memory
  93. sizeLimit: 2Gi
  94. # Quicksync
  95. - name: "render-device"
  96. hostPath:
  97. path: "/dev/dri/renderD128"
  98. ---
  99. apiVersion: v1
  100. kind: Service
  101. metadata:
  102. name: jellyfin-service
  103. namespace: plex
  104. spec:
  105. selector:
  106. app: jellyfin
  107. type: ClusterIP
  108. ports:
  109. - name: jellyfin-web-port
  110. protocol: TCP
  111. port: 8096
  112. targetPort: http-web-svc
  113. ---
  114. apiVersion: networking.k8s.io/v1
  115. kind: Ingress
  116. metadata:
  117. name: jellyfin
  118. namespace: plex
  119. annotations:
  120. traefik.ingress.kubernetes.io/router.entrypoints: websecure
  121. spec:
  122. rules:
  123. - host: jellyfin.jibby.org
  124. http:
  125. paths:
  126. - path: /
  127. pathType: Prefix
  128. backend:
  129. service:
  130. name: jellyfin-service
  131. port:
  132. number: 8096