From a76dbdeaed844ca972d1c7ebeec69d3b27089fcc Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Sat, 26 Apr 2025 16:55:27 +0200 Subject: [PATCH] feat(db): Align configuration and recovery process --- manifests/database-recovery.yaml | 27 ++++++++++++++++++--------- manifests/database.yaml | 6 +++--- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/manifests/database-recovery.yaml b/manifests/database-recovery.yaml index a8940ac..a2bbaca 100644 --- a/manifests/database-recovery.yaml +++ b/manifests/database-recovery.yaml @@ -1,11 +1,12 @@ apiVersion: postgresql.cnpg.io/v1 kind: Cluster metadata: - name: gitea-db - namespace: gitea + name: immich-db + namespace: immich spec: - instances: 2 + imageName: ghcr.io/tensorchord/cloudnative-pgvecto.rs:16.5-v0.3.0 + instances: 3 storage: size: 1Gi @@ -13,16 +14,24 @@ spec: bootstrap: recovery: - source: gitea-db + #source: immich-db + backup: + name: immich-db-ondemand-backup-230425 postgresql: pg_hba: - host all all all md5 + shared_preload_libraries: + - "vectors.so" + parameters: + max_wal_size: "2GB" + shared_buffers: "512MB" + wal_compression: "on" externalClusters: - - name: gitea-db + - name: immich-db barmanObjectStore: - serverName: gitea-db + serverName: immich-db destinationPath: "s3://halis/cloudnativepg" endpointURL: https://s3.halia.dev s3Credentials: @@ -42,7 +51,7 @@ spec: resources: requests: cpu: 100m - memory: 100Mi + memory: 512Mi limits: - cpu: 500m - memory: 500Mi + cpu: "2" + memory: 4Gi diff --git a/manifests/database.yaml b/manifests/database.yaml index 8d9b84e..4884686 100644 --- a/manifests/database.yaml +++ b/manifests/database.yaml @@ -6,7 +6,7 @@ metadata: spec: imageName: ghcr.io/tensorchord/cloudnative-pgvecto.rs:16.5-v0.3.0 - instances: 1 + instances: 3 storage: size: 1Gi @@ -56,8 +56,8 @@ spec: cpu: 100m memory: 512Mi limits: - cpu: 500m - memory: 1Gi + cpu: "2" + memory: 4Gi monitoring: enablePodMonitor: true