couchpotato.yaml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: couchpotato
  5. labels:
  6. run: couchpotato
  7. spec:
  8. ports:
  9. - name: http
  10. port: 80
  11. targetPort: 5050
  12. selector:
  13. run: couchpotato
  14. # type: LoadBalancer
  15. #status:
  16. # loadBalancer: {}
  17. ---
  18. apiVersion: v1
  19. kind: PersistentVolume
  20. metadata:
  21. name: couchpotato-movies
  22. spec:
  23. capacity:
  24. storage: 10Ti
  25. volumeMode: Filesystem
  26. accessModes:
  27. - ReadWriteMany
  28. persistentVolumeReclaimPolicy: Retain # Keep 4eva
  29. storageClassName: default
  30. mountOptions:
  31. - hard
  32. - nfsvers=3
  33. nfs:
  34. path: /mnt/DroboFS/Shares/Public/media/movies
  35. server: 10.42.42.10
  36. claimRef:
  37. name: couchpotato-movies
  38. namespace: default
  39. ---
  40. apiVersion: v1
  41. kind: PersistentVolume
  42. metadata:
  43. name: couchpotato-shared
  44. spec:
  45. capacity:
  46. storage: 10Ti
  47. volumeMode: Filesystem
  48. accessModes:
  49. - ReadWriteMany
  50. persistentVolumeReclaimPolicy: Retain # Keep 4eva
  51. storageClassName: default
  52. mountOptions:
  53. - hard
  54. - nfsvers=3
  55. nfs:
  56. path: /mnt/DroboFS/Shares/Public/
  57. server: 10.42.42.10
  58. claimRef:
  59. name: couchpotato-shared
  60. namespace: default
  61. ---
  62. apiVersion: v1
  63. kind: PersistentVolumeClaim
  64. metadata:
  65. name: couchpotato-movies
  66. spec:
  67. storageClassName: standard
  68. accessModes:
  69. - ReadWriteMany
  70. resources:
  71. requests:
  72. storage: 10Ti
  73. status: {}
  74. ---
  75. apiVersion: v1
  76. kind: PersistentVolumeClaim
  77. metadata:
  78. name: couchpotato-shared
  79. spec:
  80. storageClassName: standard
  81. accessModes:
  82. - ReadWriteMany
  83. resources:
  84. requests:
  85. storage: 10Ti
  86. status: {}
  87. ---
  88. apiVersion: v1
  89. kind: PersistentVolume
  90. metadata:
  91. name: couchpotato-config
  92. spec:
  93. capacity:
  94. storage: 5Mi
  95. volumeMode: Filesystem
  96. accessModes:
  97. - ReadWriteMany
  98. persistentVolumeReclaimPolicy: Retain # Keep 4eva
  99. storageClassName: default
  100. mountOptions:
  101. - hard
  102. - nfsvers=3
  103. nfs:
  104. path: /mnt/DroboFS/Shares/Kubernetes/volumes/static/couchpotato-config
  105. server: 10.42.42.10
  106. claimRef:
  107. name: couchpotato-config
  108. namespace: default
  109. ---
  110. apiVersion: v1
  111. kind: PersistentVolumeClaim
  112. metadata:
  113. name: couchpotato-config
  114. annotations:
  115. nfs.io/storage-path: "couchpotato-config"
  116. spec:
  117. storageClassName: default
  118. accessModes:
  119. - ReadWriteMany
  120. resources:
  121. requests:
  122. storage: 5Mi
  123. status: {}
  124. ---
  125. apiVersion: v1
  126. kind: PersistentVolume
  127. metadata:
  128. name: couchpotato-downloads
  129. spec:
  130. capacity:
  131. storage: 5Mi
  132. volumeMode: Filesystem
  133. accessModes:
  134. - ReadWriteMany
  135. persistentVolumeReclaimPolicy: Retain # Keep 4eva
  136. storageClassName: default
  137. mountOptions:
  138. - hard
  139. - nfsvers=3
  140. nfs:
  141. path: /mnt/DroboFS/Shares/Kubernetes/volumes/static/couchpotato-downloads
  142. server: 10.42.42.10
  143. claimRef:
  144. name: couchpotato-downloads
  145. namespace: default
  146. ---
  147. apiVersion: v1
  148. kind: PersistentVolumeClaim
  149. metadata:
  150. name: couchpotato-downloads
  151. annotations:
  152. nfs.io/storage-path: "couchpotato-downloads"
  153. spec:
  154. storageClassName: default
  155. accessModes:
  156. - ReadWriteMany
  157. resources:
  158. requests:
  159. storage: 5Mi
  160. status: {}
  161. ---
  162. apiVersion: apps/v1
  163. kind: Deployment
  164. metadata:
  165. name: couchpotato
  166. spec:
  167. replicas: 1
  168. selector:
  169. matchLabels:
  170. run: couchpotato
  171. strategy:
  172. type: Recreate
  173. template:
  174. metadata:
  175. labels:
  176. run: couchpotato
  177. spec:
  178. containers:
  179. - image: linuxserver/couchpotato
  180. imagePullPolicy: "Always"
  181. name: couchpotato
  182. env:
  183. - name: TZ
  184. value: US/Michigan
  185. ports:
  186. - containerPort: 5050
  187. resources: {}
  188. volumeMounts:
  189. - mountPath: /config
  190. name: couchpotato-config
  191. - mountPath: /downloads
  192. name: couchpotato-downloads
  193. - mountPath: /movies
  194. name: couchpotato-movies
  195. - mountPath: /shared
  196. name: couchpotato-shared
  197. restartPolicy: Always
  198. volumes:
  199. - name: couchpotato-config
  200. persistentVolumeClaim:
  201. claimName: couchpotato-config
  202. - name: couchpotato-downloads
  203. persistentVolumeClaim:
  204. claimName: couchpotato-downloads
  205. - name: couchpotato-movies
  206. persistentVolumeClaim:
  207. claimName: couchpotato-movies
  208. - name: couchpotato-shared
  209. persistentVolumeClaim:
  210. claimName: couchpotato-shared
  211. dnsPolicy: "None"
  212. dnsConfig:
  213. nameservers:
  214. - 10.42.42.239
  215. - 10.42.42.1
  216. searches:
  217. - default.svc.cluster.local
  218. - svc.cluster.local
  219. - cluster.local
  220. options:
  221. - name: ndots
  222. value: "2"
  223. - name: edns0
  224. - name: trust-ad
  225. status: {}
  226. ---
  227. # Hosting
  228. apiVersion: networking.k8s.io/v1
  229. kind: Ingress
  230. metadata:
  231. name: couchpotato-ingress
  232. annotations:
  233. cert-manager.io/cluster-issuer: "letsencrypt-prod"
  234. ## No basic auth for couchpotato
  235. ## type of authentication
  236. #nginx.ingress.kubernetes.io/auth-type: basic
  237. ## name of the secret that contains the user/password definitions
  238. #nginx.ingress.kubernetes.io/auth-secret: basic-auth
  239. ## message to display with an appropriate context why the authentication is required
  240. #nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - Octoprint'
  241. spec:
  242. tls:
  243. - hosts:
  244. - couchpotato.monkeybox.org
  245. - movies.monkeybox.org
  246. secretName: couchpotato-tls
  247. rules:
  248. - host: couchpotato.monkeybox.org
  249. http:
  250. paths:
  251. - path: /
  252. pathType: Prefix
  253. backend:
  254. service:
  255. name: couchpotato
  256. port:
  257. number: 80
  258. - host: movies.monkeybox.org
  259. http:
  260. paths:
  261. - path: /
  262. pathType: Prefix
  263. backend:
  264. service:
  265. name: couchpotato
  266. port:
  267. number: 80