From 12bb040e3db6d2ac5de5233c37e7c43e1da6ef3c Mon Sep 17 00:00:00 2001 From: hamilcarBarca17 Date: Thu, 6 Oct 2022 11:02:15 -0600 Subject: [PATCH] Installed Readarr and Kavita --- base/ingress.yaml | 14 +++++ base/kavita.yaml | 65 +++++++++++++++++++++ base/kustomization.yaml | 2 + base/radarr.yaml | 2 +- base/readarr.yaml | 96 +++++++++++++++++++++++++++++++ base/transmission.yaml | 2 +- base/volumes_patch.yaml | 26 +++++++++ overlays/armhf/kustomization.yaml | 3 + 8 files changed, 208 insertions(+), 2 deletions(-) create mode 100644 base/kavita.yaml create mode 100644 base/readarr.yaml diff --git a/base/ingress.yaml b/base/ingress.yaml index e8d126d..a641ec8 100644 --- a/base/ingress.yaml +++ b/base/ingress.yaml @@ -54,6 +54,20 @@ spec: name: prowlarr port: name: webui + - path: /readarr + pathType: Prefix + backend: + service: + name: readarr + port: + name: webui + - path: /kavita + pathType: Prefix + backend: + service: + name: kavita + port: + name: webui --- apiVersion: networking.k8s.io/v1 kind: IngressClass diff --git a/base/kavita.yaml b/base/kavita.yaml new file mode 100644 index 0000000..186b784 --- /dev/null +++ b/base/kavita.yaml @@ -0,0 +1,65 @@ +apiVersion: v1 +kind: Service +metadata: + name: kavita +spec: + ports: + - port: 5000 + protocol: TCP + targetPort: 5000 + name: webui + selector: + run: kavita +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + run: kavita + name: kavita +spec: + replicas: 1 + selector: + matchLabels: + run: kavita + template: + metadata: + labels: + run: kavita + spec: + securityContext: + fsGroup: 1000 + initContainers: + - name: chown + image: busybox + command: ["sh", "-c", "chown -R 1000:1000 /config && chown -R 1000:1000 /books"] + volumeMounts: + - mountPath: /config + name: htpc-home + subPath: kavita + - mountPath: /books + name: htpc-home + subPath: media/books + containers: + - env: + - name: TZ + value: America/Denver + - name: PUID + value: "1000" + - name: PGID + value: "1000" + image: kizaing/kavita + name: kavita + ports: + - containerPort: 5000 + name: webui + volumeMounts: + - mountPath: /config + name: htpc-home + subPath: kavita + - mountPath: /books + name: htpc-home + subPath: media/books + - mountPath: /downloads + name: htpc-home + subPath: downloads diff --git a/base/kustomization.yaml b/base/kustomization.yaml index 65897df..ea24a8d 100644 --- a/base/kustomization.yaml +++ b/base/kustomization.yaml @@ -14,6 +14,8 @@ resources: - transmission.yaml - plex.yaml - prowlarr.yml +- readarr.yaml +- kavita.yaml - ingress.yaml patchesStrategicMerge: diff --git a/base/radarr.yaml b/base/radarr.yaml index 79a89da..b7070b4 100644 --- a/base/radarr.yaml +++ b/base/radarr.yaml @@ -58,7 +58,7 @@ spec: containers: - env: - name: TZ - value: Pacific/Auckland + value: America/Denver - name: PUID value: "1000" - name: PGID diff --git a/base/readarr.yaml b/base/readarr.yaml new file mode 100644 index 0000000..0458417 --- /dev/null +++ b/base/readarr.yaml @@ -0,0 +1,96 @@ +apiVersion: v1 +kind: Service +metadata: + name: readarr +spec: + ports: + - port: 8787 + protocol: TCP + targetPort: 8787 + name: webui + selector: + run: readarr +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + run: readarr + name: readarr +spec: + replicas: 1 + selector: + matchLabels: + run: readarr + template: + metadata: + labels: + run: readarr + spec: + securityContext: + fsGroup: 1000 + initContainers: + - name: chown + image: busybox + command: ["sh", "-c", "chown -R 1000:1000 /config && chown -R 1000:1000 /books && chown -R 1000:1000 /downloads"] + volumeMounts: + - mountPath: /config + name: htpc-home + subPath: readarr + - mountPath: /books + name: htpc-home + subPath: media/books + - mountPath: /downloads + name: htpc-home + subPath: downloads + - name: config + image: busybox + command: ["sh", "-c"] + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + args: + - "echo start;[[ ! -f /config/config.xml ]] && echo '/$(READARR)'> /config/config.xml;echo end;" + volumeMounts: + - mountPath: /config + name: htpc-home + subPath: readarr + containers: + - env: + - name: TZ + value: America/Denver + - name: PUID + value: "1000" + - name: PGID + value: "1000" + image: linuxserver/readarr + name: readarr + ports: + - containerPort: 8787 + name: webui + livenessProbe: + exec: + command: + - /bin/sh + - -c + - curl "http://localhost:8787/readarr/api/health?ApiKey=$(sed -ne '/ApiKey/{s/.*\(.*\)<\/ApiKey>.*/\1/p;q;}' \(.*\)<\/ApiKey>.*/\1/p;q;}'