mirror of
https://github.com/auricom/home-cluster.git
synced 2025-09-17 18:24:14 +02:00
✨ immich machine learning cache
This commit is contained in:
@@ -11,5 +11,6 @@ resources:
|
|||||||
- ./machine-learning
|
- ./machine-learning
|
||||||
- ./server
|
- ./server
|
||||||
- ./typesense
|
- ./typesense
|
||||||
|
- ./volsync.yaml
|
||||||
- ./volumes.yaml
|
- ./volumes.yaml
|
||||||
- ./web
|
- ./web
|
||||||
|
@@ -56,7 +56,8 @@ spec:
|
|||||||
mountPath: /usr/src/app/upload
|
mountPath: /usr/src/app/upload
|
||||||
cache:
|
cache:
|
||||||
enabled: true
|
enabled: true
|
||||||
type: emptyDir
|
existingClaim: immich-machine-learning-cache
|
||||||
|
mountPath: /cache
|
||||||
topologySpreadConstraints:
|
topologySpreadConstraints:
|
||||||
- maxSkew: 1
|
- maxSkew: 1
|
||||||
topologyKey: kubernetes.io/hostname
|
topologyKey: kubernetes.io/hostname
|
||||||
|
66
kubernetes/apps/default/immich/app/volsync.yaml
Normal file
66
kubernetes/apps/default/immich/app/volsync.yaml
Normal 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
|
@@ -44,3 +44,20 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 1Gi
|
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
|
||||||
|
Reference in New Issue
Block a user