diff --git a/README.md b/README.md index 740781d..e23ab8e 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,9 @@ It includes the following applications: * [Radarr](https://radarr.video/) for movies * [Bazarr](https://github.com/morpheus65535/bazarr) for subtitles * Transmission for torrents -* [Jackett](https://github.com/Jackett/Jackett) for torrent tracker searching +* ~~[Jackett](https://github.com/Jackett/Jackett) for torrent tracker searching~~ +* [Prowlarr](https://prowlarr.com/) for index management +* [Readarr](https://readarr.com/) for ebooks * [Emby](https://emby.media/) Applications state (settings / db) and media files are stored in a shared volume of type `hostPath`. It does not use PVC and currently only works if the whole `htpc` namespace is deployed in the same node. @@ -94,6 +96,8 @@ You should also be able to reach each component's UI using the links below. Don' |sonarr|http://localhost/sonarr |bazarr|http://localhost/bazarr |jacket|http://localhost/jackett +|prowlarr|http://localhost/prowlarr +|readarr|http://localhost/readarr |transmission|http://localhost/transmission |emby|http://localhost/ @@ -112,9 +116,11 @@ It uses a `hostPath` volume to store configuration and media files. It defaults ├── bazarr ├── downloads ├── emby -├── jackett +├── prowlarr +├── readarr ├── media │   ├── movies +│   ├── books │   └── tv ├── radarr ├── sonarr diff --git a/base/ingress-route.yaml b/base/ingress-route.yaml index 12afd46..082d772 100644 --- a/base/ingress-route.yaml +++ b/base/ingress-route.yaml @@ -69,3 +69,12 @@ spec: name: prowlarr namespace: "htpc" port: 9696 + - kind: Rule + match: PathPrefix(`/readarr`) + middlewares: [] + priority: 0 + services: + - kind: Service + name: readarr + namespace: "htpc" + port: 8787 \ No newline at end of file diff --git a/base/kustomization.yaml b/base/kustomization.yaml index af7d4a2..3c04211 100644 --- a/base/kustomization.yaml +++ b/base/kustomization.yaml @@ -16,6 +16,7 @@ resources: - transmission - emby - ingress-route.yaml +- readarr patchesStrategicMerge: - volumes_patch.yaml @@ -37,3 +38,8 @@ vars: kind: Service name: prowlarr apiVersion: v1 + - name: READARR + objref: + kind: Service + name: readarr + apiVersion: v1 diff --git a/base/radarr/deployment.yaml b/base/radarr/deployment.yaml index aca960e..ee68650 100644 --- a/base/radarr/deployment.yaml +++ b/base/radarr/deployment.yaml @@ -24,10 +24,10 @@ spec: image: busybox command: ["sh", "-c", "chown -R 1000:1000 /config && chown -R 1000:1000 /movies"] volumeMounts: - - mountPath: /config + - mountPath: /config name: htpc-home - subPath: radarr - - mountPath: /movies + subPath: radarr + - mountPath: /movies name: htpc-home subPath: media/movies - name: config diff --git a/base/readarr/deployment.yaml b/base/readarr/deployment.yaml new file mode 100644 index 0000000..9a43a7e --- /dev/null +++ b/base/readarr/deployment.yaml @@ -0,0 +1,84 @@ +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"] + volumeMounts: + - mountPath: /config + name: htpc-home + subPath: readarr + - mountPath: /books + name: htpc-home + subPath: media/books + - name: config + image: busybox + command: ["sh", "-c"] + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + args: + - | + echo 'Customizing config...' + if [[ ! -f /config/config.xml ]]; then + echo '/$(READARR)'> /config/config.xml + fi + echo 'Done customizing.' + volumeMounts: + - mountPath: /config + name: htpc-home + subPath: readarr + containers: + - name: readarr + image: lscr.io/linuxserver/readarr + env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + - name: TZ + value: Pacific/Auckland + ports: + - containerPort: 8787 + livenessProbe: + exec: + command: + - /bin/sh + - -c + - curl "http://localhost:8787/readarr/api/v1/health?ApiKey=$(sed -ne '/ApiKey/{s/.*\(.*\)<\/ApiKey>.*/\1/p;q;}' \(.*\)<\/ApiKey>.*/\1/p;q;}' \(.*\)<\/ApiKey>.*/\1/p;q;}' + \(.*\)<\/ApiKey>.*/\1/p;q;}' /readarr'> /config/config.xml + fi + echo 'Done customizing.' + command: + - sh + - -c + image: busybox + name: config + securityContext: + runAsGroup: 1000 + runAsUser: 1000 + volumeMounts: + - mountPath: /config + name: htpc-home + subPath: readarr + securityContext: + fsGroup: 1000 + volumes: + - hostPath: + path: /opt/htpc + type: DirectoryOrCreate + name: htpc-home +--- +apiVersion: apps/v1 +kind: Deployment metadata: labels: app: htpc @@ -768,3 +886,12 @@ spec: name: prowlarr namespace: htpc port: 9696 + - kind: Rule + match: PathPrefix(`/readarr`) + middlewares: [] + priority: 0 + services: + - kind: Service + name: readarr + namespace: htpc + port: 8787 diff --git a/install_x86_64.yaml b/install_x86_64.yaml index e01611e..3faace6 100644 --- a/install_x86_64.yaml +++ b/install_x86_64.yaml @@ -93,6 +93,23 @@ spec: --- apiVersion: v1 kind: Service +metadata: + labels: + app: htpc + name: readarr + namespace: htpc +spec: + ports: + - name: webui + port: 8787 + protocol: TCP + targetPort: 8787 + selector: + app: htpc + run: readarr +--- +apiVersion: v1 +kind: Service metadata: labels: app: htpc @@ -519,6 +536,107 @@ spec: --- apiVersion: apps/v1 kind: Deployment +metadata: + labels: + app: htpc + run: readarr + name: readarr + namespace: htpc +spec: + replicas: 1 + selector: + matchLabels: + app: htpc + run: readarr + template: + metadata: + labels: + app: htpc + run: readarr + spec: + containers: + - env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + - name: TZ + value: Pacific/Auckland + image: lscr.io/linuxserver/readarr:nightly-0.4.16.2788-ls395 + livenessProbe: + exec: + command: + - /bin/sh + - -c + - curl "http://localhost:8787/readarr/api/v1/health?ApiKey=$(sed -ne '/ApiKey/{s/.*\(.*\)<\/ApiKey>.*/\1/p;q;}' + \(.*\)<\/ApiKey>.*/\1/p;q;}' /readarr'> /config/config.xml + fi + echo 'Done customizing.' + command: + - sh + - -c + image: busybox + name: config + securityContext: + runAsGroup: 1000 + runAsUser: 1000 + volumeMounts: + - mountPath: /config + name: htpc-home + subPath: readarr + securityContext: + fsGroup: 1000 + volumes: + - hostPath: + path: /opt/htpc + type: DirectoryOrCreate + name: htpc-home +--- +apiVersion: apps/v1 +kind: Deployment metadata: labels: app: htpc @@ -768,3 +886,12 @@ spec: name: prowlarr namespace: htpc port: 9696 + - kind: Rule + match: PathPrefix(`/readarr`) + middlewares: [] + priority: 0 + services: + - kind: Service + name: readarr + namespace: htpc + port: 8787 diff --git a/overlays/x86/kustomization.yaml b/overlays/x86/kustomization.yaml index 2ecd692..ae15b9a 100644 --- a/overlays/x86/kustomization.yaml +++ b/overlays/x86/kustomization.yaml @@ -19,3 +19,5 @@ images: newTag: 4.9.0.50 - name: linuxserver/prowlarr newTag: 1.34.1.5021-ls115 + - name: lscr.io/linuxserver/readarr + newTag: nightly-0.4.16.2788-ls395