RMAB setup
This commit is contained in:
parent
47c0af3286
commit
155988b20c
15 changed files with 154 additions and 187 deletions
|
|
@ -57,33 +57,3 @@ spec:
|
|||
- name: audiobookshelf-metadata
|
||||
persistentVolumeClaim:
|
||||
claimName: audiobookshelf-metadata-pvc
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: audiobookshelf-config-pvc
|
||||
labels:
|
||||
recurring-job.longhorn.io/source: "enabled"
|
||||
recurring-job-group.longhorn.io/app-config-group: "enabled"
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 3Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: audiobookshelf-metadata-pvc
|
||||
labels:
|
||||
recurring-job.longhorn.io/source: "enabled"
|
||||
recurring-job-group.longhorn.io/app-config-group: "enabled"
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Mi
|
||||
|
|
|
|||
29
services/audiobookshelf/audiobookshelf-pvcs.yaml
Normal file
29
services/audiobookshelf/audiobookshelf-pvcs.yaml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: audiobookshelf-config-pvc
|
||||
labels:
|
||||
recurring-job.longhorn.io/source: "enabled"
|
||||
recurring-job-group.longhorn.io/app-config-group: "enabled"
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: audiobookshelf-metadata-pvc
|
||||
labels:
|
||||
recurring-job.longhorn.io/source: "enabled"
|
||||
recurring-job-group.longhorn.io/app-config-group: "enabled"
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
|
|
@ -44,8 +44,10 @@ spec:
|
|||
volumeMounts:
|
||||
- mountPath: /config
|
||||
name: calibre-web-config
|
||||
- mountPath: /calibre-library
|
||||
- mountPath: /calibre-library # The calibre-managed directories
|
||||
name: calibre-web-library
|
||||
- mountPath: /cwa-book-ingest # Watched by calibre for ingest into calibre-library
|
||||
name: calibre-ingest-dir
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: calibre-web-config
|
||||
|
|
@ -55,3 +57,7 @@ spec:
|
|||
nfs:
|
||||
server: robin.home.nest
|
||||
path: /yarr/media/books/calibre-library
|
||||
- name: calibre-ingest-dir
|
||||
nfs:
|
||||
server: robin.home.nest
|
||||
path: /yarr/media/books/calibre-ingest
|
||||
|
|
|
|||
|
|
@ -11,4 +11,4 @@ spec:
|
|||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 20Mi
|
||||
storage: 5Gi
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.cmd: kompose convert -f compose-ll.yaml
|
||||
kompose.version: 1.38.0 (HEAD)
|
||||
labels:
|
||||
io.kompose.service: lazylibrarian
|
||||
name: lazylibrarian
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: lazylibrarian
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.cmd: kompose convert -f compose-ll.yaml
|
||||
kompose.version: 1.38.0 (HEAD)
|
||||
labels:
|
||||
io.kompose.service: lazylibrarian
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: DOCKER_MODS
|
||||
value: linuxserver/mods:universal-calibre|linuxserver/mods:lazylibrarian-ffmpeg
|
||||
- name: PGID
|
||||
value: "1000"
|
||||
- name: PUID
|
||||
value: "1000"
|
||||
- name: TZ
|
||||
value: America/New_York
|
||||
image: lscr.io/linuxserver/lazylibrarian:latest
|
||||
name: lazylibrarian
|
||||
ports:
|
||||
- containerPort: 5299
|
||||
protocol: TCP
|
||||
name: web-ui
|
||||
volumeMounts:
|
||||
- mountPath: /config
|
||||
name: lazylibrarian-config
|
||||
- mountPath: /downloads
|
||||
name: lazylibrarian-downloads
|
||||
- mountPath: /data
|
||||
name: lazylibrarian-data
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: lazylibrarian-config
|
||||
persistentVolumeClaim:
|
||||
claimName: lazylibrarian-config-pvc
|
||||
- name: lazylibrarian-downloads
|
||||
nfs:
|
||||
server: robin.home.nest
|
||||
path: /yarr/downloads
|
||||
- name: lazylibrarian-data
|
||||
nfs:
|
||||
server: robin.home.nest
|
||||
path: /yarr
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: lazylibrarian-config-pvc
|
||||
labels:
|
||||
recurring-job.longhorn.io/source: "enabled"
|
||||
recurring-job-group.longhorn.io/app-config-group: "enabled"
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 4Gi
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: lazy-librarian-ingress
|
||||
namespace: default
|
||||
annotations:
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: web
|
||||
spec:
|
||||
rules:
|
||||
- host: lazy-librarian.k3s.home.nest
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: lazylibrarian
|
||||
port:
|
||||
name: http-web
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.cmd: kompose convert -f compose-ll.yaml
|
||||
kompose.version: 1.38.0 (HEAD)
|
||||
labels:
|
||||
io.kompose.service: lazylibrarian
|
||||
name: lazylibrarian
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: http-web
|
||||
port: 80
|
||||
targetPort: web-ui
|
||||
selector:
|
||||
io.kompose.service: lazylibrarian
|
||||
|
|
@ -1,26 +1,20 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.cmd: kompose convert -f compose-yarr.yaml
|
||||
kompose.version: 1.38.0 (HEAD)
|
||||
labels:
|
||||
io.kompose.service: lidarr
|
||||
app: lidarr
|
||||
name: lidarr
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: lidarr
|
||||
app: lidarr
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.cmd: kompose convert -f compose-yarr.yaml
|
||||
kompose.version: 1.38.0 (HEAD)
|
||||
labels:
|
||||
io.kompose.service: lidarr
|
||||
app: lidarr
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
|
|
@ -32,6 +26,11 @@ spec:
|
|||
value: America/New_York
|
||||
- name: WEBUI_PORTS
|
||||
value: 8686/tcp
|
||||
- name: DOCKER_MODS
|
||||
value: "linuxserver/mods:lidarr-flac2mp3"
|
||||
# Instruct FFmpeg to build Opus at a transparent 160kbps VBR rate
|
||||
- name: FLAC2MP3_ARGS
|
||||
value: "-a '-acodec libopus -ac 2 -ab 160k' -e .opus"
|
||||
image: lscr.io/linuxserver/lidarr:nightly
|
||||
name: lidarr
|
||||
ports:
|
||||
|
|
@ -58,18 +57,3 @@ spec:
|
|||
nfs:
|
||||
server: robin.home.nest
|
||||
path: /yarr/downloads
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: lidarr-config-pvc
|
||||
labels:
|
||||
recurring-job.longhorn.io/source: "enabled"
|
||||
recurring-job-group.longhorn.io/app-config-group: "enabled"
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
|
|
|
|||
15
services/lidarr/lidarr-pvcs.yaml
Normal file
15
services/lidarr/lidarr-pvcs.yaml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: lidarr-config-pvc
|
||||
labels:
|
||||
recurring-job.longhorn.io/source: "enabled"
|
||||
recurring-job-group.longhorn.io/app-config-group: "enabled"
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
|
|
@ -11,4 +10,4 @@ spec:
|
|||
port: 80
|
||||
targetPort: lidarr-ui
|
||||
selector:
|
||||
io.kompose.service: lidarr
|
||||
app: lidarr
|
||||
|
|
|
|||
|
|
@ -54,18 +54,3 @@ spec:
|
|||
nfs:
|
||||
server: robin.home.nest
|
||||
path: /yarr/media/music
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: navidrome-config-pvc
|
||||
labels:
|
||||
recurring-job.longhorn.io/source: "enabled"
|
||||
recurring-job-group.longhorn.io/app-config-group: "enabled"
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
|
|
|
|||
14
services/navidrome/navidrome-pvcs.yaml
Normal file
14
services/navidrome/navidrome-pvcs.yaml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: navidrome-config-pvc
|
||||
labels:
|
||||
recurring-job.longhorn.io/source: "enabled"
|
||||
recurring-job-group.longhorn.io/app-config-group: "enabled"
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
60
services/readmeabook/readmeabook-cron-jobs.yaml
Normal file
60
services/readmeabook/readmeabook-cron-jobs.yaml
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: media-hardlink-router
|
||||
namespace: default
|
||||
spec:
|
||||
schedule: "*/5 * * * *"
|
||||
concurrencyPolicy: Forbid
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: hardlink-router
|
||||
image: alpine:latest
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
echo "Starting companion ebook routing..."
|
||||
|
||||
# Paths mapped entirely within the clean media tree
|
||||
AUDIO_DIR="/yarr/media/audiobooks"
|
||||
BOOK_INGEST="/yarr/media/books/calibre-ingest"
|
||||
LOG_FILE="/yarr/media/books/.calibre_sidecars_linked.log"
|
||||
|
||||
touch "$LOG_FILE"
|
||||
|
||||
# Scan pristine audiobook folders for companion ebooks
|
||||
if [ -d "$AUDIO_DIR" ]; then
|
||||
find "$AUDIO_DIR" -type f \( -iname \*.epub -o -iname \*.azw3 -o -iname \*.cbz -o -iname \*.pdf \) -exec sh -c '
|
||||
BOOK_INGEST="$1"
|
||||
LOG_FILE="$2"
|
||||
shift 2
|
||||
for file do
|
||||
filename=$(basename "$file")
|
||||
dest_calibre="$BOOK_INGEST/$filename"
|
||||
|
||||
# Verify against log to prevent Calibre re-import loops
|
||||
if ! grep -qxF "$file" "$LOG_FILE"; then
|
||||
if [ ! -f "$dest_calibre" ]; then
|
||||
ln "$file" "$dest_calibre"
|
||||
echo "$file" >> "$LOG_FILE"
|
||||
echo "Linked clean companion ebook to Calibre: $filename"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
' sh "$BOOK_INGEST" "$LOG_FILE" {} +
|
||||
fi
|
||||
|
||||
echo "Routing complete."
|
||||
volumeMounts:
|
||||
- name: yarr-volume
|
||||
mountPath: /yarr
|
||||
restartPolicy: OnFailure
|
||||
volumes:
|
||||
- name: yarr-volume
|
||||
nfs:
|
||||
server: robin.home.nest
|
||||
path: /yarr
|
||||
|
|
@ -15,6 +15,7 @@ spec:
|
|||
containers:
|
||||
- name: server
|
||||
image: ghcr.io/haveagitgat/tdarr:latest
|
||||
|
||||
env:
|
||||
- name: TZ
|
||||
value: "America/New_York"
|
||||
|
|
@ -71,9 +72,15 @@ spec:
|
|||
labels:
|
||||
app: tdarr-node-cpu
|
||||
spec:
|
||||
nodeSelector:
|
||||
kubernetes.io/arch: amd64 # Only run on Robin which has QSV
|
||||
securityContext:
|
||||
supplementalGroups: [26, 303] # Matches NixOS 'video' (26) and 'render' (303)
|
||||
containers:
|
||||
- name: node
|
||||
image: ghcr.io/haveagitgat/tdarr_node:latest
|
||||
securityContext:
|
||||
privileged: true
|
||||
env:
|
||||
- name: TZ
|
||||
value: "America/New_York"
|
||||
|
|
@ -94,13 +101,15 @@ spec:
|
|||
mountPath: /media
|
||||
- name: cache-volume
|
||||
mountPath: /temp
|
||||
- name: dev-dri
|
||||
mountPath: /dev/dri
|
||||
resources:
|
||||
requests:
|
||||
cpu: "2000m"
|
||||
cpu: "1500m"
|
||||
memory: "2Gi"
|
||||
limits:
|
||||
cpu: "6"
|
||||
memory: "4Gi"
|
||||
cpu: "4"
|
||||
memory: "5Gi"
|
||||
volumes:
|
||||
- name: media-volume
|
||||
nfs:
|
||||
|
|
@ -109,3 +118,7 @@ spec:
|
|||
- name: cache-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: tdarr-cache-rwx
|
||||
- name: dev-dri
|
||||
hostPath:
|
||||
path: /dev/dri
|
||||
type: Directory
|
||||
|
|
|
|||
|
|
@ -138,6 +138,9 @@ spec:
|
|||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
labels:
|
||||
recurring-job.longhorn.io/source: "enabled"
|
||||
recurring-job-group.longhorn.io/app-config-group: "enabled"
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
storageClassName: longhorn
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue