Skip to content

Commit bb77d7f

Browse files
authored
feat: Add Readarr (#41)
* feat: Add Readarr * fix: selectors * docs: Add readarr and prowlarr to readme
1 parent f82c00e commit bb77d7f

File tree

11 files changed

+396
-7
lines changed

11 files changed

+396
-7
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ It includes the following applications:
1111
* [Radarr](https://radarr.video/) for movies
1212
* [Bazarr](https://github.com/morpheus65535/bazarr) for subtitles
1313
* Transmission for torrents
14-
* [Jackett](https://github.com/Jackett/Jackett) for torrent tracker searching
14+
* ~~[Jackett](https://github.com/Jackett/Jackett) for torrent tracker searching~~
15+
* [Prowlarr](https://prowlarr.com/) for index management
16+
* [Readarr](https://readarr.com/) for ebooks
1517
* [Emby](https://emby.media/)
1618

1719
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'
9496
|sonarr|http://localhost/sonarr
9597
|bazarr|http://localhost/bazarr
9698
|jacket|http://localhost/jackett
99+
|prowlarr|http://localhost/prowlarr
100+
|readarr|http://localhost/readarr
97101
|transmission|http://localhost/transmission
98102
|emby|http://localhost/
99103

@@ -112,9 +116,11 @@ It uses a `hostPath` volume to store configuration and media files. It defaults
112116
├── bazarr
113117
├── downloads
114118
├── emby
115-
├── jackett
119+
├── prowlarr
120+
├── readarr
116121
├── media
117122
│   ├── movies
123+
│   ├── books
118124
│   └── tv
119125
├── radarr
120126
├── sonarr

base/ingress-route.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,12 @@ spec:
6969
name: prowlarr
7070
namespace: "htpc"
7171
port: 9696
72+
- kind: Rule
73+
match: PathPrefix(`/readarr`)
74+
middlewares: []
75+
priority: 0
76+
services:
77+
- kind: Service
78+
name: readarr
79+
namespace: "htpc"
80+
port: 8787

base/kustomization.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ resources:
1616
- transmission
1717
- emby
1818
- ingress-route.yaml
19+
- readarr
1920

2021
patchesStrategicMerge:
2122
- volumes_patch.yaml
@@ -37,3 +38,8 @@ vars:
3738
kind: Service
3839
name: prowlarr
3940
apiVersion: v1
41+
- name: READARR
42+
objref:
43+
kind: Service
44+
name: readarr
45+
apiVersion: v1

base/radarr/deployment.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ spec:
2424
image: busybox
2525
command: ["sh", "-c", "chown -R 1000:1000 /config && chown -R 1000:1000 /movies"]
2626
volumeMounts:
27-
- mountPath: /config
27+
- mountPath: /config
2828
name: htpc-home
29-
subPath: radarr
30-
- mountPath: /movies
29+
subPath: radarr
30+
- mountPath: /movies
3131
name: htpc-home
3232
subPath: media/movies
3333
- name: config

base/readarr/deployment.yaml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
labels:
5+
run: readarr
6+
name: readarr
7+
spec:
8+
replicas: 1
9+
selector:
10+
matchLabels:
11+
run: readarr
12+
template:
13+
metadata:
14+
labels:
15+
run: readarr
16+
spec:
17+
securityContext:
18+
fsGroup: 1000
19+
initContainers:
20+
- name: chown
21+
image: busybox
22+
command: ["sh", "-c", "chown -R 1000:1000 /config && chown -R 1000:1000 /books"]
23+
volumeMounts:
24+
- mountPath: /config
25+
name: htpc-home
26+
subPath: readarr
27+
- mountPath: /books
28+
name: htpc-home
29+
subPath: media/books
30+
- name: config
31+
image: busybox
32+
command: ["sh", "-c"]
33+
securityContext:
34+
runAsUser: 1000
35+
runAsGroup: 1000
36+
args:
37+
- |
38+
echo 'Customizing config...'
39+
if [[ ! -f /config/config.xml ]]; then
40+
echo '<Config><UrlBase>/$(READARR)</UrlBase></Config>'> /config/config.xml
41+
fi
42+
echo 'Done customizing.'
43+
volumeMounts:
44+
- mountPath: /config
45+
name: htpc-home
46+
subPath: readarr
47+
containers:
48+
- name: readarr
49+
image: lscr.io/linuxserver/readarr
50+
env:
51+
- name: PUID
52+
value: "1000"
53+
- name: PGID
54+
value: "1000"
55+
- name: TZ
56+
value: Pacific/Auckland
57+
ports:
58+
- containerPort: 8787
59+
livenessProbe:
60+
exec:
61+
command:
62+
- /bin/sh
63+
- -c
64+
- curl "http://localhost:8787/readarr/api/v1/health?ApiKey=$(sed -ne '/ApiKey/{s/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p;q;}' </config/config.xml)"
65+
initialDelaySeconds: 30
66+
periodSeconds: 10
67+
readinessProbe:
68+
exec:
69+
command:
70+
- /bin/sh
71+
- -c
72+
- curl "http://localhost:8787/readarr/api/v1/system/status?ApiKey=$(sed -ne '/ApiKey/{s/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p;q;}' </config/config.xml)"
73+
initialDelaySeconds: 30
74+
periodSeconds: 10
75+
volumeMounts:
76+
- mountPath: /config
77+
name: htpc-home
78+
subPath: readarr
79+
- mountPath: /books
80+
name: htpc-home
81+
subPath: media/books
82+
- mountPath: /downloads
83+
name: htpc-home
84+
subPath: downloads

base/readarr/kustomization.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- deployment.yaml
5+
- service.yaml

base/readarr/service.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: readarr
5+
spec:
6+
ports:
7+
- port: 8787
8+
protocol: TCP
9+
targetPort: 8787
10+
name: webui
11+
selector:
12+
run: readarr

base/volumes_patch.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ spec:
7575
path: /opt/htpc
7676
type: DirectoryOrCreate
7777
name: htpc-home
78-
# persistentVolumeClaim:
79-
# claimName: local-path-pvc
8078
---
8179
apiVersion: apps/v1
8280
kind: Deployment
@@ -90,3 +88,16 @@ spec:
9088
path: /opt/htpc
9189
type: DirectoryOrCreate
9290
name: htpc-home
91+
---
92+
apiVersion: apps/v1
93+
kind: Deployment
94+
metadata:
95+
name: readarr
96+
spec:
97+
template:
98+
spec:
99+
volumes:
100+
- hostPath:
101+
path: /opt/htpc
102+
type: DirectoryOrCreate
103+
name: htpc-home

install_armhf.yaml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,23 @@ spec:
9393
---
9494
apiVersion: v1
9595
kind: Service
96+
metadata:
97+
labels:
98+
app: htpc
99+
name: readarr
100+
namespace: htpc
101+
spec:
102+
ports:
103+
- name: webui
104+
port: 8787
105+
protocol: TCP
106+
targetPort: 8787
107+
selector:
108+
app: htpc
109+
run: readarr
110+
---
111+
apiVersion: v1
112+
kind: Service
96113
metadata:
97114
labels:
98115
app: htpc
@@ -519,6 +536,107 @@ spec:
519536
---
520537
apiVersion: apps/v1
521538
kind: Deployment
539+
metadata:
540+
labels:
541+
app: htpc
542+
run: readarr
543+
name: readarr
544+
namespace: htpc
545+
spec:
546+
replicas: 1
547+
selector:
548+
matchLabels:
549+
app: htpc
550+
run: readarr
551+
template:
552+
metadata:
553+
labels:
554+
app: htpc
555+
run: readarr
556+
spec:
557+
containers:
558+
- env:
559+
- name: PUID
560+
value: "1000"
561+
- name: PGID
562+
value: "1000"
563+
- name: TZ
564+
value: Pacific/Auckland
565+
image: lscr.io/linuxserver/readarr
566+
livenessProbe:
567+
exec:
568+
command:
569+
- /bin/sh
570+
- -c
571+
- curl "http://localhost:8787/readarr/api/v1/health?ApiKey=$(sed -ne '/ApiKey/{s/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p;q;}'
572+
</config/config.xml)"
573+
initialDelaySeconds: 30
574+
periodSeconds: 10
575+
name: readarr
576+
ports:
577+
- containerPort: 8787
578+
readinessProbe:
579+
exec:
580+
command:
581+
- /bin/sh
582+
- -c
583+
- curl "http://localhost:8787/readarr/api/v1/system/status?ApiKey=$(sed
584+
-ne '/ApiKey/{s/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p;q;}' </config/config.xml)"
585+
initialDelaySeconds: 30
586+
periodSeconds: 10
587+
volumeMounts:
588+
- mountPath: /config
589+
name: htpc-home
590+
subPath: readarr
591+
- mountPath: /books
592+
name: htpc-home
593+
subPath: media/books
594+
- mountPath: /downloads
595+
name: htpc-home
596+
subPath: downloads
597+
initContainers:
598+
- command:
599+
- sh
600+
- -c
601+
- chown -R 1000:1000 /config && chown -R 1000:1000 /books
602+
image: busybox
603+
name: chown
604+
volumeMounts:
605+
- mountPath: /config
606+
name: htpc-home
607+
subPath: readarr
608+
- mountPath: /books
609+
name: htpc-home
610+
subPath: media/books
611+
- args:
612+
- |
613+
echo 'Customizing config...'
614+
if [[ ! -f /config/config.xml ]]; then
615+
echo '<Config><UrlBase>/readarr</UrlBase></Config>'> /config/config.xml
616+
fi
617+
echo 'Done customizing.'
618+
command:
619+
- sh
620+
- -c
621+
image: busybox
622+
name: config
623+
securityContext:
624+
runAsGroup: 1000
625+
runAsUser: 1000
626+
volumeMounts:
627+
- mountPath: /config
628+
name: htpc-home
629+
subPath: readarr
630+
securityContext:
631+
fsGroup: 1000
632+
volumes:
633+
- hostPath:
634+
path: /opt/htpc
635+
type: DirectoryOrCreate
636+
name: htpc-home
637+
---
638+
apiVersion: apps/v1
639+
kind: Deployment
522640
metadata:
523641
labels:
524642
app: htpc
@@ -768,3 +886,12 @@ spec:
768886
name: prowlarr
769887
namespace: htpc
770888
port: 9696
889+
- kind: Rule
890+
match: PathPrefix(`/readarr`)
891+
middlewares: []
892+
priority: 0
893+
services:
894+
- kind: Service
895+
name: readarr
896+
namespace: htpc
897+
port: 8787

0 commit comments

Comments
 (0)