Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions base/api-key-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: arr-apps-api-key
data:
api_key: "e575a60f4f4335d8109fd60355b7c650"
28 changes: 1 addition & 27 deletions base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ commonLabels:

resources:
- namespace.yaml
- api-key-configmap.yaml
- jackett
- radarr
- sonarr
Expand All @@ -23,30 +24,3 @@ resources:
patchesStrategicMerge:
- volumes_patch.yaml
- env_variables_patch.yaml

vars:
- name: SONARR
objref:
kind: Service
name: sonarr
apiVersion: v1
- name: RADARR
objref:
kind: Service
name: radarr
apiVersion: v1
- name: PROWLARR
objref:
kind: Service
name: prowlarr
apiVersion: v1
- name: READARR
objref:
kind: Service
name: readarr
apiVersion: v1
- name: KAVITA
objref:
kind: Service
name: kavita
apiVersion: v1
13 changes: 6 additions & 7 deletions base/lidarr/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@ spec:
value: "1000"
- name: LIDARR__SERVER__URLBASE
value: /lidarr
- name: LIDARR__AUTH__METHOD
value: external
- name: LIDARR__AUTH__REQUIRED
value: enabled
- name: LIDARR__AUTH__APIKEY
value: htk8s-api-key-secure
valueFrom:
configMapKeyRef:
name: arr-apps-api-key
key: api_key
image: lscr.io/linuxserver/lidarr
name: lidarr
ports:
Expand All @@ -56,15 +55,15 @@ spec:
command:
- /bin/sh
- -c
- curl "http://localhost:8686/lidarr/api/v1/health?ApiKey=$LIDARR__AUTH__APIKEY"
- curl "http://localhost:8686/lidarr/api/v1/health?ApiKey=$(LIDARR__AUTH__APIKEY)"
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
exec:
command:
- /bin/sh
- -c
- curl "http://localhost:8686/lidarr/api/v1/system/status?ApiKey=$LIDARR__AUTH__APIKEY"
- curl "http://localhost:8686/lidarr/api/v1/system/status?ApiKey=$(LIDARR__AUTH__APIKEY)"
initialDelaySeconds: 30
periodSeconds: 10
volumeMounts:
Expand Down
36 changes: 13 additions & 23 deletions base/prowlarr/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,13 @@ spec:
run: prowlarr
spec:
securityContext:
fsGroup: 1000
fsGroup: 1000
initContainers:
- name: chown
image: busybox
command: ["sh", "-c", "chown -R 1000:1000 /config"]
volumeMounts:
- mountPath: /config
name: htpc-home
subPath: prowlarr
- name: config
image: busybox
securityContext:
runAsUser: 1000
runAsGroup: 1000
command: ["sh", "-c"]
args:
- |
echo 'Customizing Prowlarr config...'
if [[ ! -f /config/config.xml ]]; then
echo '<Config><UrlBase>/$(PROWLARR)</UrlBase></Config>'> /config/config.xml
fi
echo 'Prowlarr config customized.'
volumeMounts:
- mountPath: /config
- mountPath: /config
name: htpc-home
subPath: prowlarr
containers:
Expand All @@ -50,6 +33,13 @@ spec:
value: "1000"
- name: PGID
value: "1000"
- name: PROWLARR__SERVER__URLBASE
value: /prowlarr
- name: PROWLARR__AUTH__APIKEY
valueFrom:
configMapKeyRef:
name: arr-apps-api-key
key: api_key
image: linuxserver/prowlarr
name: prowlarr
ports:
Expand All @@ -60,18 +50,18 @@ spec:
command:
- /bin/sh
- -c
- curl "http://localhost:9696/prowlarr/api/v1/health?ApiKey=$(sed -ne '/ApiKey/{s/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p;q;}' </config/config.xml)"
- curl "http://localhost:9696/prowlarr/api/v1/health?ApiKey=$(PROWLARR__AUTH__APIKEY)"
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
exec:
command:
- /bin/sh
- -c
- curl "http://localhost:9696/prowlarr/api/v1/system/status?ApiKey=$(sed -ne '/ApiKey/{s/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p;q;}' </config/config.xml)"
- curl "http://localhost:9696/prowlarr/api/v1/system/status?ApiKey=$(PROWLARR__AUTH__APIKEY)"
initialDelaySeconds: 30
periodSeconds: 10
volumeMounts:
- mountPath: /config
volumeMounts:
- mountPath: /config
name: htpc-home
subPath: prowlarr
23 changes: 9 additions & 14 deletions base/radarr/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,6 @@ spec:
- mountPath: /movies
name: htpc-home
subPath: media/movies
- name: config
image: busybox
command: ["sh", "-c"]
securityContext:
runAsUser: 1000
runAsGroup: 1000
args:
- "echo start;[[ ! -f /config/config.xml ]] && echo '<Config><UrlBase>/$(RADARR)</UrlBase></Config>'> /config/config.xml;echo end;"
volumeMounts:
- mountPath: /config
name: htpc-home
subPath: radarr
containers:
- env:
- name: TZ
Expand All @@ -50,6 +38,13 @@ spec:
value: "1000"
- name: PGID
value: "1000"
- name: RADARR__SERVER__URLBASE
value: /radarr
- name: RADARR__AUTH__APIKEY
valueFrom:
configMapKeyRef:
name: arr-apps-api-key
key: api_key
image: linuxserver/radarr
name: radarr
ports:
Expand All @@ -60,15 +55,15 @@ spec:
command:
- /bin/sh
- -c
- curl "http://localhost:7878/radarr/api/health?ApiKey=$(sed -ne '/ApiKey/{s/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p;q;}' </config/config.xml)"
- curl "http://localhost:7878/radarr/api/health?ApiKey=$(RADARR__AUTH__APIKEY)"
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
exec:
command:
- /bin/sh
- -c
- curl "http://localhost:7878/radarr/api/system/status?ApiKey=$(sed -ne '/ApiKey/{s/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p;q;}' </config/config.xml)"
- curl "http://localhost:7878/radarr/api/system/status?ApiKey=$(RADARR__AUTH__APIKEY)"
initialDelaySeconds: 30
periodSeconds: 10
volumeMounts:
Expand Down
28 changes: 9 additions & 19 deletions base/readarr/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,6 @@ spec:
- mountPath: /comics
name: htpc-home
subPath: media/books/comics
- name: config
image: busybox
command: ["sh", "-c"]
securityContext:
runAsUser: 1000
runAsGroup: 1000
args:
- |
echo 'Customizing config...'
if [[ ! -f /config/config.xml ]]; then
echo '<Config><UrlBase>/$(READARR)</UrlBase></Config>'> /config/config.xml
fi
echo 'Done customizing.'
volumeMounts:
- mountPath: /config
name: htpc-home
subPath: readarr
containers:
- name: readarr
image: lscr.io/linuxserver/readarr
Expand All @@ -60,22 +43,29 @@ spec:
value: "1000"
- name: TZ
value: Pacific/Auckland
- name: READARR__SERVER__URLBASE
value: /readarr
- name: READARR__AUTH__APIKEY
valueFrom:
configMapKeyRef:
name: arr-apps-api-key
key: api_key
ports:
- containerPort: 8787
livenessProbe:
exec:
command:
- /bin/sh
- -c
- curl "http://localhost:8787/readarr/api/v1/health?ApiKey=$(sed -ne '/ApiKey/{s/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p;q;}' </config/config.xml)"
- curl "http://localhost:8787/readarr/api/v1/health?ApiKey=$(READARR__AUTH__APIKEY)"
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
exec:
command:
- /bin/sh
- -c
- curl "http://localhost:8787/readarr/api/v1/system/status?ApiKey=$(sed -ne '/ApiKey/{s/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p;q;}' </config/config.xml)"
- curl "http://localhost:8787/readarr/api/v1/system/status?ApiKey=$(READARR__AUTH__APIKEY)"
initialDelaySeconds: 30
periodSeconds: 10
volumeMounts:
Expand Down
23 changes: 9 additions & 14 deletions base/sonarr/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,6 @@ spec:
- mountPath: /tv
name: htpc-home
subPath: media/tv
- name: config
image: busybox
command: ["sh", "-c"]
securityContext:
runAsUser: 1000
runAsGroup: 1000
args:
- "echo start;[[ ! -f /config/config.xml ]] && echo '<Config><UrlBase>/$(SONARR)</UrlBase></Config>'> /config/config.xml;echo end;"
volumeMounts:
- mountPath: /config
name: htpc-home
subPath: sonarr
containers:
- env:
- name: TZ
Expand All @@ -50,6 +38,13 @@ spec:
value: "1000"
- name: PGID
value: "1000"
- name: SONARR__SERVER__URLBASE
value: /sonarr
- name: SONARR__AUTH__APIKEY
valueFrom:
configMapKeyRef:
name: arr-apps-api-key
key: api_key
image: linuxserver/sonarr
name: sonarr
ports:
Expand All @@ -60,15 +55,15 @@ spec:
command:
- /bin/sh
- -c
- curl "http://localhost:8989/sonarr/api/health?ApiKey=$(sed -ne '/ApiKey/{s/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p;q;}' </config/config.xml)"
- curl "http://localhost:8989/sonarr/api/health?ApiKey=$(SONARR__AUTH__APIKEY)"
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
exec:
command:
- /bin/sh
- -c
- curl "http://localhost:8989/sonarr/api/system/status?ApiKey=$(sed -ne '/ApiKey/{s/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p;q;}' </config/config.xml)"
- curl "http://localhost:8989/sonarr/api/system/status?ApiKey=$(SONARR__AUTH__APIKEY)"
initialDelaySeconds: 30
periodSeconds: 10
volumeMounts:
Expand Down
Loading