cloudnativepg: create separate cluster for immich
This commit is contained in:
53
postgres/config/clusters/immich.yaml
Normal file
53
postgres/config/clusters/immich.yaml
Normal file
@@ -0,0 +1,53 @@
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Cluster
|
||||
metadata:
|
||||
name: immich
|
||||
spec:
|
||||
# At the time of writing, immich is only compatible with pgvecto.rs <0.4. Latest postgres image with that version is 16.5.
|
||||
imageName: ghcr.io/tensorchord/cloudnative-pgvecto.rs:16.5-v0.3.0@sha256:be3f025d79aa1b747817f478e07e71be43236e14d00d8a9eb3914146245035ba
|
||||
# A bug was reported in v0.3.0, which does not allow a replicated setup:
|
||||
# https://github.com/immich-app/immich-charts/issues/149#issuecomment-2559012759
|
||||
instances: 1
|
||||
|
||||
postgresql:
|
||||
shared_preload_libraries:
|
||||
- "vectors.so"
|
||||
|
||||
# The "postgres" superuser is needed only for import and it can be deactivated after migration.
|
||||
enableSuperuserAccess: true
|
||||
# superuserSecret: immich-superuser
|
||||
|
||||
managed:
|
||||
roles:
|
||||
- name: immich
|
||||
superuser: true
|
||||
login: true
|
||||
passwordSecret:
|
||||
name: immich-auth
|
||||
|
||||
bootstrap:
|
||||
initdb:
|
||||
database: immich
|
||||
owner: immich
|
||||
# secret:
|
||||
# name: immich-postgres-user
|
||||
postInitSQL:
|
||||
- CREATE EXTENSION IF NOT EXISTS "vectors";
|
||||
- CREATE EXTENSION IF NOT EXISTS "cube" CASCADE;
|
||||
- CREATE EXTENSION IF NOT EXISTS "earthdistance" CASCADE;
|
||||
|
||||
storage:
|
||||
size: 8Gi
|
||||
storageClass: rook-ceph-block
|
||||
|
||||
backup:
|
||||
barmanObjectStore:
|
||||
destinationPath: "s3://weyma-talos-shared-pgsql-backup/"
|
||||
endpointURL: http://10.105.15.20:9000
|
||||
s3Credentials:
|
||||
accessKeyId:
|
||||
key: s3AccessKey
|
||||
name: s3-backup-creds
|
||||
secretAccessKey:
|
||||
key: s3SecretKey
|
||||
name: s3-backup-creds
|
||||
@@ -1,12 +0,0 @@
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Database
|
||||
metadata:
|
||||
name: immich-db
|
||||
namespace: cloudnativepg
|
||||
spec:
|
||||
cluster:
|
||||
name: weyma-pgsql
|
||||
databaseReclaimPolicy: retain
|
||||
ensure: present
|
||||
name: immich
|
||||
owner: immich
|
||||
@@ -6,4 +6,14 @@ spec:
|
||||
schedule: "0 4 * * *"
|
||||
backupOwnerReference: self
|
||||
cluster:
|
||||
name: weyma-pgsql
|
||||
name: weyma-pgsql
|
||||
---
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: ScheduledBackup
|
||||
metadata:
|
||||
name: immich-postgres-nightly
|
||||
spec:
|
||||
schedule: "0 4 * * *"
|
||||
backupOwnerReference: self
|
||||
cluster:
|
||||
name: immich
|
||||
Reference in New Issue
Block a user