deploy lidarr

This commit is contained in:
2026-10-22 08:08:53 +00:00
parent e9b199aca0
commit b45f9a19a2
6 changed files with 132 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
# This Argo CD Application deploys Lidarr to manage the music library.
# It uses Hotio's lightweight Lidarr container image.
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: lidarr
namespace: argocd
# Omit the cascading finalizer so deleting this Application does not
# automatically delete Lidarr's config-bearing PersistentVolumeClaim.
spec:
project: default
source:
repoURL: https://tea.ahmza.com/ahmza.com/k8s-starter-pack.git
targetRevision: main
path: apps/lidarr
destination:
server: https://kubernetes.default.svc
namespace: lidarr
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
+52
View File
@@ -0,0 +1,52 @@
# Lidarr image maintained by Hotio: ghcr.io/hotio/lidarr.
apiVersion: apps/v1
kind: Deployment
metadata:
name: lidarr
namespace: lidarr
spec:
# not critical infrastructure a single pod should be sufficient
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: lidarr
template:
metadata:
labels:
app: lidarr
spec:
containers:
- name: lidarr
image: ghcr.io/hotio/lidarr:release
imagePullPolicy: Always
env:
- name: PUID
value: "1000"
- name: PGID
value: "1000"
- name: UMASK
value: "002"
- name: TZ
value: "Europe/London"
ports:
- name: http
containerPort: 8686
protocol: TCP
volumeMounts:
- name: lidarr-config
mountPath: /config
# Mount each media directory directly instead of using subPath.
# The NFS export root is not listable by root-squashed clients, so
# kubelet cannot safely prepare subPath mounts from that root.
- name: music
mountPath: /data
volumes:
- name: lidarr-config
persistentVolumeClaim:
claimName: lidarr-data
- name: music
nfs:
server: nas.ahmza.com
path: /srv/media/Music
+25
View File
@@ -0,0 +1,25 @@
# Route lidarr.ahmza.com through ingress-nginx (docs/11-ingress.md).
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: lidarr
namespace: lidarr
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
tls:
- hosts:
- lidarr.ahmza.com
# cert-manager keeps this up to date. nothing to do by hand
secretName: lidarr-tls
rules:
- host: lidarr.ahmza.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: lidarr
port:
number: 8686
+4
View File
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: lidarr
+12
View File
@@ -0,0 +1,12 @@
# Store Lidarr's config on a Longhorn volume (see docs/06-longhorn.md).
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: lidarr-data
namespace: lidarr
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
+12
View File
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: lidarr
namespace: lidarr
spec:
selector:
app: lidarr
ports:
- name: http
port: 8686
targetPort: http