From 63eac18b1609bb03212013371b8aafe03c9c5d78 Mon Sep 17 00:00:00 2001 From: Mans Ziesel Date: Sun, 27 Oct 2024 15:17:02 +0100 Subject: [PATCH] add sonarr --- .../base/mediaserver-sonarr-deployment.yaml | 51 +++++++++++++++++++ .../base/mediaserver-sonarr-ingress.yaml | 12 +++++ mediaserver/base/mediaserver-sonarr-pvc.yaml | 11 ++++ mediaserver/base/mediaserver-sonarr-svc.yaml | 11 ++++ mediaserver/kustomization.yaml | 4 ++ 5 files changed, 89 insertions(+) create mode 100644 mediaserver/base/mediaserver-sonarr-deployment.yaml create mode 100644 mediaserver/base/mediaserver-sonarr-ingress.yaml create mode 100644 mediaserver/base/mediaserver-sonarr-pvc.yaml create mode 100644 mediaserver/base/mediaserver-sonarr-svc.yaml diff --git a/mediaserver/base/mediaserver-sonarr-deployment.yaml b/mediaserver/base/mediaserver-sonarr-deployment.yaml new file mode 100644 index 0000000..50550c2 --- /dev/null +++ b/mediaserver/base/mediaserver-sonarr-deployment.yaml @@ -0,0 +1,51 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: sonarr + labels: + app: sonarr +spec: + replicas: 1 + selector: + matchLabels: + app: sonarr + template: + metadata: + labels: + app: sonarr + annotations: + spec: + volumes: + - name: sonarr-config + persistentVolumeClaim: + claimName: mediaserver-sonarr-config-pvc + - name: plex-data + persistentVolumeClaim: + claimName: mediaserver-plex-data-pvc + - name: rdtclient-downloads + persistentVolumeClaim: + claimName: mediaserver-rdtclient-downloads-pvc + containers: + - name: sonarr + image: ghcr.io/hotio/sonarr:nightly@sha256:sha256:7536521875e68b2f7a7c367e85807cfceb1e3b5e29d998d668f54b29302e0dfd + resources: + requests: + cpu: 1 + memory: 512Mi + ports: + - name: web + containerPort: 8989 + env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + - name: TZ + value: Europe/Amsterdam + volumeMounts: + - mountPath: /config + name: sonarr-config + - mountPath: /data/downloads + name: rdtclient-downloads + - mountPath: /media + name: plex-data diff --git a/mediaserver/base/mediaserver-sonarr-ingress.yaml b/mediaserver/base/mediaserver-sonarr-ingress.yaml new file mode 100644 index 0000000..b52f443 --- /dev/null +++ b/mediaserver/base/mediaserver-sonarr-ingress.yaml @@ -0,0 +1,12 @@ +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: mediaserver-sonarr-ingressroute +spec: + routes: + - match: Host(`sonarr.k8s.mziesel.nl`) + kind: Rule + services: + - name: mediaserver-sonarr + port: web + tls: {} diff --git a/mediaserver/base/mediaserver-sonarr-pvc.yaml b/mediaserver/base/mediaserver-sonarr-pvc.yaml new file mode 100644 index 0000000..a567c7d --- /dev/null +++ b/mediaserver/base/mediaserver-sonarr-pvc.yaml @@ -0,0 +1,11 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: mediaserver-sonarr-config-pvc +spec: + storageClassName: nfs-client + accessModes: + - ReadWriteMany + resources: + requests: + storage: 2Gi diff --git a/mediaserver/base/mediaserver-sonarr-svc.yaml b/mediaserver/base/mediaserver-sonarr-svc.yaml new file mode 100644 index 0000000..be302e0 --- /dev/null +++ b/mediaserver/base/mediaserver-sonarr-svc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: mediaserver-sonarr +spec: + ports: + - name: web + port: 80 + targetPort: web + selector: + app: sonarr diff --git a/mediaserver/kustomization.yaml b/mediaserver/kustomization.yaml index f3bb346..a71cc87 100644 --- a/mediaserver/kustomization.yaml +++ b/mediaserver/kustomization.yaml @@ -21,5 +21,9 @@ resources: - ./base/mediaserver-radarr-ingress.yaml - ./base/mediaserver-radarr-pvc.yaml - ./base/mediaserver-radarr-svc.yaml +- ./base/mediaserver-sonarr-deployment.yaml +- ./base/mediaserver-sonarr-ingress.yaml +- ./base/mediaserver-sonarr-pvc.yaml +- ./base/mediaserver-sonarr-svc.yaml - ./base/mediaserver-flaresolverr-deployment.yaml - ./base/mediaserver-flaresolverr-svc.yaml