From d705cf3617e55d10f76a2480fcff9a8bf2e3ff59 Mon Sep 17 00:00:00 2001 From: kisfenyo Date: Thu, 18 Dec 2025 15:11:27 +0100 Subject: [PATCH] added audiobookshelf --- argocd-apps/homelab.yaml | 22 +++ audiobookshelf-system/audiobookshelf.yaml | 171 ++++++++++++++++++++++ 2 files changed, 193 insertions(+) create mode 100644 audiobookshelf-system/audiobookshelf.yaml diff --git a/argocd-apps/homelab.yaml b/argocd-apps/homelab.yaml index 3dfefab..3b49c54 100644 --- a/argocd-apps/homelab.yaml +++ b/argocd-apps/homelab.yaml @@ -104,3 +104,25 @@ spec: - CreateNamespace=true - PruneLast=true --- +# AudioBookshelf +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: audiobookshelf + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: homelab + source: + repoURL: https://gitea.dooplex.hu/admin/homelab-manifests.git + targetRevision: main + path: audiobookshelf-system + destination: + server: https://kubernetes.default.svc + namespace: audiobookshelf-system + syncPolicy: + syncOptions: + - CreateNamespace=true + - PruneLast=true +--- diff --git a/audiobookshelf-system/audiobookshelf.yaml b/audiobookshelf-system/audiobookshelf.yaml new file mode 100644 index 0000000..797223b --- /dev/null +++ b/audiobookshelf-system/audiobookshelf.yaml @@ -0,0 +1,171 @@ +--- +# Namespace +apiVersion: v1 +kind: Namespace +metadata: + name: audiobookshelf-system +--- +# Service Account +apiVersion: v1 +kind: ServiceAccount +metadata: + name: default + namespace: audiobookshelf-system +--- +# PVC for config/metadata/backups +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: audiobookshelf-config + namespace: audiobookshelf-system + labels: + app.kubernetes.io/instance: audiobookshelf + app.kubernetes.io/name: audiobookshelf +spec: + accessModes: + - ReadWriteOnce + storageClassName: longhorn + resources: + requests: + storage: 5Gi +--- +# Audiobookshelf Deployment +apiVersion: apps/v1 +kind: Deployment +metadata: + name: audiobookshelf + namespace: audiobookshelf-system + labels: + app.kubernetes.io/instance: audiobookshelf + app.kubernetes.io/name: audiobookshelf + app.kubernetes.io/version: 2.30.0 +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + app.kubernetes.io/instance: audiobookshelf + app.kubernetes.io/name: audiobookshelf + template: + metadata: + labels: + app.kubernetes.io/instance: audiobookshelf + app.kubernetes.io/name: audiobookshelf + app.kubernetes.io/version: 2.30.0 + spec: + containers: + - name: audiobookshelf + image: advplyr/audiobookshelf:2.30.0 + imagePullPolicy: IfNotPresent + env: + - name: TZ + value: Europe/Budapest + ports: + - name: http + containerPort: 80 + protocol: TCP + resources: + limits: + cpu: "1" + memory: 1Gi + requests: + cpu: 100m + memory: 256Mi + livenessProbe: + httpGet: + path: /healthcheck + port: http + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /healthcheck + port: http + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + volumeMounts: + - name: config + mountPath: /config + subPath: config + - name: config + mountPath: /metadata + subPath: metadata + - name: audiobooks + mountPath: /audiobooks + volumes: + - name: config + persistentVolumeClaim: + claimName: audiobookshelf-config + - name: audiobooks + hostPath: + path: /mnt/4_hdd/Audiobook + type: Directory +--- +# Audiobookshelf Service +apiVersion: v1 +kind: Service +metadata: + name: audiobookshelf + namespace: audiobookshelf-system + labels: + app.kubernetes.io/instance: audiobookshelf + app.kubernetes.io/name: audiobookshelf + app.kubernetes.io/version: 2.30.0 +spec: + type: ClusterIP + ports: + - name: http + port: 80 + targetPort: http + protocol: TCP + selector: + app.kubernetes.io/instance: audiobookshelf + app.kubernetes.io/name: audiobookshelf +--- +# Ingress +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: audiobookshelf + namespace: audiobookshelf-system + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + external-dns.alpha.kubernetes.io/hostname: audiobookshelf.dooplex.hu,audiobookshelf.home + nginx.ingress.kubernetes.io/ssl-redirect: "true" + nginx.ingress.kubernetes.io/proxy-body-size: "0" + nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" + nginx.ingress.kubernetes.io/proxy-send-timeout: "3600" + labels: + app.kubernetes.io/instance: audiobookshelf + app.kubernetes.io/name: audiobookshelf +spec: + ingressClassName: nginx-internal + rules: + - host: audiobookshelf.dooplex.hu + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: audiobookshelf + port: + number: 80 + - host: audiobookshelf.home + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: audiobookshelf + port: + number: 80 + tls: + - hosts: + - audiobookshelf.dooplex.hu + secretName: audiobookshelf-tls