sonarr.yaml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. ---
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: sonarr
  6. namespace: plex
  7. spec:
  8. selector:
  9. matchLabels:
  10. app: sonarr
  11. replicas: 1
  12. template:
  13. metadata:
  14. labels:
  15. app: sonarr
  16. spec:
  17. containers:
  18. - name: sonarr
  19. image: lscr.io/linuxserver/sonarr:4.0.0-v4
  20. ports:
  21. - containerPort: 8989
  22. name: http-web-svc
  23. command:
  24. - "/bin/bash"
  25. - "-c"
  26. # Mount an sshfs connection to the seedbox
  27. - "apk update && apk add sshfs && cp remote-secrets/REMOTE_KEY /key && chown 600 /key && mkdir /remote && chown 1000:1000 /remote && sshfs -o allow_other,default_permissions,uid=1000,gid=1000,umask=002 $REMOTE -o IdentityFile=/key -o StrictHostKeyChecking=no /remote && /init"
  28. env:
  29. - name: TZ
  30. value: America/New_York
  31. - name: PUID
  32. value: "1000"
  33. - name: PGID
  34. value: "1000"
  35. volumeMounts:
  36. - mountPath: "/plex"
  37. name: plex
  38. - mountPath: "/config"
  39. name: config
  40. - name: remote-secret
  41. mountPath: /remote-secrets
  42. envFrom:
  43. - secretRef:
  44. name: sonarr-remote-secret
  45. securityContext:
  46. privileged: true # required for sshfs mount
  47. volumes:
  48. - name: plex
  49. persistentVolumeClaim:
  50. claimName: plex-pvc
  51. - name: config
  52. persistentVolumeClaim:
  53. claimName: sonarr-pvc
  54. - name: remote-secret
  55. secret:
  56. secretName: sonarr-remote-secret
  57. ---
  58. apiVersion: v1
  59. kind: Service
  60. metadata:
  61. name: sonarr-service
  62. namespace: plex
  63. spec:
  64. selector:
  65. app: sonarr
  66. type: ClusterIP
  67. ports:
  68. - name: sonarr-web-port
  69. protocol: TCP
  70. port: 8989
  71. targetPort: http-web-svc