feat(audiobookshelf): sts -> deploy, vs populator

This commit is contained in:
JJGadgets
2023-11-15 06:50:10 +08:00
parent 0eb5ce26ae
commit ada09e5b9c
3 changed files with 46 additions and 25 deletions

View File

@@ -8,7 +8,7 @@ spec:
chart:
spec:
chart: app-template
version: 2.0.2
version: 2.2.0
sourceRef:
name: bjw-s
kind: HelmRepository
@@ -16,7 +16,7 @@ spec:
values:
controllers:
main:
type: statefulset
type: deployment
replicas: 1
pod:
labels:
@@ -38,14 +38,6 @@ spec:
memory: 128Mi
limits:
memory: 6000Mi
statefulset:
volumeClaimTemplates:
- name: config
mountPath: *config
accessMode: ReadWriteOnce
size: 20Gi
storageClass: block
# initContainers:
service:
main:
ports:
@@ -68,6 +60,13 @@ spec:
- hosts:
- *host
persistence:
config:
enabled: true
existingClaim: "audiobookshelf-config"
advancedMounts:
main:
main:
- path: *config
nfs:
enabled: true
type: nfs

View File

@@ -2,31 +2,31 @@
apiVersion: v1
kind: Secret
metadata:
name: audiobookshelf-config-restic
namespace: audiobookshelf
name: "audiobookshelf-config-restic"
namespace: "audiobookshelf"
type: Opaque
stringData:
RESTIC_REPOSITORY: ${SECRET_VOLSYNC_R2_REPO}/audiobookshelf/config
RESTIC_PASSWORD: ${SECRET_VOLSYNC_PASSWORD}
AWS_ACCESS_KEY_ID: ${SECRET_VOLSYNC_R2_ID}
AWS_SECRET_ACCESS_KEY: ${SECRET_VOLSYNC_R2_KEY}
RESTIC_REPOSITORY: "${SECRET_VOLSYNC_R2_REPO}/audiobookshelf/config"
RESTIC_PASSWORD: "${SECRET_VOLSYNC_PASSWORD}"
AWS_ACCESS_KEY_ID: "${SECRET_VOLSYNC_R2_ID}"
AWS_SECRET_ACCESS_KEY: "${SECRET_VOLSYNC_R2_KEY}"
---
apiVersion: volsync.backube/v1alpha1
kind: ReplicationSource
metadata:
name: audiobookshelf-config-restic
namespace: audiobookshelf
name: "audiobookshelf-config-restic"
namespace: "audiobookshelf"
spec:
sourcePVC: config-audiobookshelf-0
sourcePVC: "audiobookshelf-config"
trigger:
schedule: "0 6 * * *"
restic:
copyMethod: Snapshot
copyMethod: "Snapshot"
pruneIntervalDays: 14
repository: audiobookshelf-config-restic
cacheCapacity: 2Gi
volumeSnapshotClassName: block
storageClassName: block
repository: "audiobookshelf-config-restic"
cacheCapacity: "2Gi"
volumeSnapshotClassName: "file"
storageClassName: "file"
moverSecurityContext:
runAsUser: &uid ${APP_UID_AUDIOBOOKSHELF}
runAsGroup: *uid
@@ -34,3 +34,23 @@ spec:
retain:
daily: 14
within: 7d
---
apiVersion: volsync.backube/v1alpha1
kind: ReplicationDestination
metadata:
name: "jellyfin-bootstrap"
namespace: "jellyfin"
spec:
trigger:
manual: "restore-once-bootstrap"
restic:
repository: "jellyfin-restic"
copyMethod: "Snapshot"
volumeSnapshotClassName: "file"
storageClassName: "file"
capacity: "50Gi"
accessModes: ["ReadWriteMany"]
moverSecurityContext:
runAsUser: &uid ${APP_UID_AUDIOBOOKSHELF}
runAsGroup: *uid
fsGroup: *uid

View File

@@ -4,9 +4,11 @@ kind: Kustomization
metadata:
name: audiobookshelf-app
namespace: flux-system
labels:
prune.flux.home.arpa/enabled: "true"
wait.flux.home.arpa/disabled: "true"
spec:
path: ./kube/deploy/apps/audiobookshelf/app
dependsOn:
- name: 1-core-storage-rook-ceph-cluster
- name: 1-core-ingress-nginx-app
- name: 1-core-storage-volsync-app