immich machine learning cache

This commit is contained in:
auricom
2023-09-24 21:41:21 +02:00
parent 650d2df212
commit 6a9a611885
4 changed files with 86 additions and 1 deletions

View File

@@ -11,5 +11,6 @@ resources:
- ./machine-learning
- ./server
- ./typesense
- ./volsync.yaml
- ./volumes.yaml
- ./web

View File

@@ -56,7 +56,8 @@ spec:
mountPath: /usr/src/app/upload
cache:
enabled: true
type: emptyDir
existingClaim: immich-machine-learning-cache
mountPath: /cache
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname

View File

@@ -0,0 +1,66 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.devbu.io/external-secrets.io/externalsecret_v1beta1.json
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: immich-restic
namespace: default
spec:
secretStoreRef:
kind: ClusterSecretStore
name: onepassword-connect
target:
name: immich-restic-secret
creationPolicy: Owner
template:
engineVersion: v2
data:
RESTIC_REPOSITORY: '{{ .REPOSITORY_TEMPLATE }}/immich'
RESTIC_PASSWORD: '{{ .RESTIC_PASSWORD }}'
AWS_ACCESS_KEY_ID: '{{ .AWS_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '{{ .AWS_SECRET_ACCESS_KEY }}'
dataFrom:
- extract:
key: volsync-restic-template
---
# yaml-language-server: $schema=https://kubernetes-schemas.devbu.io/volsync.backube/replicationsource_v1alpha1.json
apiVersion: volsync.backube/v1alpha1
kind: ReplicationSource
metadata:
name: immich-config
namespace: default
spec:
sourcePVC: immich-config
trigger:
schedule: "0 7 * * *"
restic:
copyMethod: Snapshot
pruneIntervalDays: 7
repository: immich-restic-secret
cacheCapacity: 10Gi
volumeSnapshotClassName: csi-ceph-blockpool
storageClassName: rook-ceph-block
retain:
daily: 7
within: 3d
---
# yaml-language-server: $schema=https://kubernetes-schemas.devbu.io/volsync.backube/replicationsource_v1alpha1.json
apiVersion: volsync.backube/v1alpha1
kind: ReplicationSource
metadata:
name: immich-machine-learning-cache
namespace: default
spec:
sourcePVC: immich-machine-learning-cache
trigger:
schedule: "0 7 * * *"
restic:
copyMethod: Snapshot
pruneIntervalDays: 7
repository: immich-restic-secret
cacheCapacity: 10Gi
volumeSnapshotClassName: csi-ceph-blockpool
storageClassName: rook-ceph-block
retain:
daily: 7
within: 3d

View File

@@ -44,3 +44,20 @@ spec:
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: immich-machine-learning-cache
namespace: default
labels:
app.kubernetes.io/name: &name immich
app.kubernetes.io/instance: *name
snapshot.home.arpa/enabled: "true"
spec:
accessModes:
- ReadWriteOnce
storageClassName: rook-ceph-block
resources:
requests:
storage: 10Gi