From d42556978964220da2f72501fbb2f3ae78a315e1 Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Tue, 9 Jul 2024 10:22:33 -0400 Subject: [PATCH] Added Audiobookshelf --- k8s/apps/videohosting/templates/sts-abs.yaml | 95 ++++++++++++++++++++ k8s/apps/videohosting/values.yaml | 16 ++++ 2 files changed, 111 insertions(+) create mode 100644 k8s/apps/videohosting/templates/sts-abs.yaml diff --git a/k8s/apps/videohosting/templates/sts-abs.yaml b/k8s/apps/videohosting/templates/sts-abs.yaml new file mode 100644 index 0000000..a17a39f --- /dev/null +++ b/k8s/apps/videohosting/templates/sts-abs.yaml @@ -0,0 +1,95 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: abs-envs +data: + PUID: "1000" + PGID: "1000" + TZ: {{ .Values.global.timezone }} + +--- +kind: Service +apiVersion: v1 +metadata: + name: abs +spec: + selector: + app: abs + type: ClusterIP + ports: + - port: 80 + targetPort: 80 + name: "http" +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: abs +spec: + selector: + matchLabels: + app: abs + replicas: 1 + revisionHistoryLimit: 2 + updateStrategy: + type: RollingUpdate + volumeClaimTemplates: + - metadata: + name: config + finalizers: + - kubernetes.io/pvc-protection + spec: + accessModes: + - ReadWriteOnce + resources: + {{ .Values.abs.configVolumesResources | toYaml | nindent 12 }} + template: + metadata: + labels: + app: abs + spec: + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + preference: + matchExpressions: + - key: homelab/capacity + operator: In + values: + - high + containers: + - name: abs + image: "{{ .Values.abs.repo }}:{{ .Values.abs.tag }}" + imagePullPolicy: "Always" + envFrom: + - configMapRef: + name: abs-envs + ports: + - containerPort: 80 + name: http + resources: + {{ .Values.abs.resources | toYaml | nindent 12 }} + volumeMounts: + - name: config + mountPath: /config + subPath: config + - name: metadata + mountPath: /metadata + subPath: metadata + - name: torrents + mountPath: /books + subPath: books + startupProbe: + tcpSocket: + port: abs + initialDelaySeconds: 10 + failureThreshold: 10 + timeoutSeconds: 30 + volumes: + - name: torrents + nfs: + server: "{{ $.Values.global.nfs.server }}" + path: "{{ $.Values.global.nfs.additionalShares.torrents }}" + readOnly: true \ No newline at end of file diff --git a/k8s/apps/videohosting/values.yaml b/k8s/apps/videohosting/values.yaml index 5dc0a1f..dd4ad5a 100644 --- a/k8s/apps/videohosting/values.yaml +++ b/k8s/apps/videohosting/values.yaml @@ -15,6 +15,7 @@ plex: requests: cpu: 3.5 memory: "4Gi" + jellyfin: repo: "lscr.io/linuxserver/jellyfin" tag: latest @@ -25,6 +26,21 @@ jellyfin: cpu: 1 memory: "4Gi" +abs: + repo: ghcr.io/advplyr/audiobookshelf + tag: latest + resources: + limits: + memory: "4Gi" + requests: + cpu: 1 + memory: "4Gi" + configVolumesResources: + requests: + storage: 10Gi + limits: + storage: 100Gi + arrs: sonarr: repo: lscr.io/linuxserver/sonarr