From 48c3603a8c4b3d9b463ea9edd119318a40847cdd Mon Sep 17 00:00:00 2001 From: aggarwalakshun Date: Fri, 18 Apr 2025 07:38:17 +0530 Subject: [PATCH] feat: add Sonarr deployment, service, and persistent volume claim --- cluster/apps/sonarr/sonarr-pvc.yml | 13 +++++++++ cluster/apps/sonarr/sonarr-svc.yml | 16 ++++++++++ cluster/apps/sonarr/sonarr.yml | 47 ++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 cluster/apps/sonarr/sonarr-pvc.yml create mode 100644 cluster/apps/sonarr/sonarr-svc.yml create mode 100644 cluster/apps/sonarr/sonarr.yml diff --git a/cluster/apps/sonarr/sonarr-pvc.yml b/cluster/apps/sonarr/sonarr-pvc.yml new file mode 100644 index 0000000..17cbc23 --- /dev/null +++ b/cluster/apps/sonarr/sonarr-pvc.yml @@ -0,0 +1,13 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: longhorn-sonarr + namespace: default +spec: + accessModes: + - ReadWriteMany + storageClassName: longhorn + resources: + requests: + storage: 500Mi diff --git a/cluster/apps/sonarr/sonarr-svc.yml b/cluster/apps/sonarr/sonarr-svc.yml new file mode 100644 index 0000000..797ecf4 --- /dev/null +++ b/cluster/apps/sonarr/sonarr-svc.yml @@ -0,0 +1,16 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: sonarr-service + namespace: default +spec: + type: NodePort + selector: + app: sonarr + ports: + - port: 8989 + targetPort: 8989 + nodePort: 8989 + protocol: TCP + diff --git a/cluster/apps/sonarr/sonarr.yml b/cluster/apps/sonarr/sonarr.yml new file mode 100644 index 0000000..46b412e --- /dev/null +++ b/cluster/apps/sonarr/sonarr.yml @@ -0,0 +1,47 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: sonarr + namespace: default +spec: + replicas: 1 + selector: + matchLabels: + app: sonarr + template: + metadata: + labels: + app: sonarr + spec: + containers: + - name: sonarr + image: lscr.io/linuxserver/sonarr:4.0.14 + ports: + - containerPort: 8989 + env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + - name: TZ + value: "Asia/Kolkata" + volumeMounts: + - name: config + mountPath: /config + - name: tv + mountPath: /tv + - name: downloads + mountPath: /downloads + volumes: + - name: config + persistentVolumeClaim: + claimName: longhorn-sonarr + - name: downloads + nfs: + server: 10.0.0.123 + path: /merge/downloads + - name: tv + nfs: + server: 10.0.0.123 + path: /merge/series