Immich/manifests/database.yaml

64 lines
1.3 KiB
YAML

apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: immich-db
namespace: immich
spec:
imageName: ghcr.io/tensorchord/cloudnative-pgvecto.rs:16.5-v0.3.0
instances: 1
storage:
size: 1Gi
storageClass: local-path
bootstrap:
initdb:
database: immich
owner: immich
secret:
name: immich-db
postInitSQL:
- ALTER SYSTEM SET search_path TO "$user", public, vectors;
- CREATE EXTENSION IF NOT EXISTS "vectors";
dataChecksums: true
postgresql:
pg_hba:
- host all all all md5
shared_preload_libraries:
- "vectors.so"
parameters:
max_wal_size: "2GB"
shared_buffers: "512MB"
wal_compression: "on"
backup:
barmanObjectStore:
destinationPath: "s3://halis/cloudnativepg"
endpointURL: https://s3.halia.dev
s3Credentials:
accessKeyId:
name: s3-secret
key: AWS_ACCESS_KEY_ID
secretAccessKey:
name: s3-secret
key: AWS_SECRET_ACCESS_KEY
region:
name: s3-secret
key: AWS_REGION
wal:
compression: gzip
maxParallel: 8
resources:
requests:
cpu: 100m
memory: 512Mi
limits:
cpu: 500m
memory: 1Gi
monitoring:
enablePodMonitor: true