-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostgres.yaml
71 lines (71 loc) · 1.77 KB
/
postgres.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: postgresql
namespace: immich
spec:
instances: 3
imageName: ghcr.io/tensorchord/cloudnative-pgvecto.rs:16.3-v0.2.1
enableSuperuserAccess: true
bootstrap:
initdb:
database: immich
owner: immich
postInitApplicationSQL:
- CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
- CREATE EXTENSION IF NOT EXISTS cube;
- CREATE EXTENSION IF NOT EXISTS earthdistance CASCADE;
- CREATE EXTENSION IF NOT EXISTS vectors;
- CREATE EXTENSION IF NOT EXISTS pg_trgm;
- CREATE EXTENSION IF NOT EXISTS unaccent;
- ALTER DATABASE immich SET search_path TO "$user", public, vectors;
- GRANT USAGE ON SCHEMA vectors TO immich;
- GRANT SELECT ON TABLE pg_vector_index_stat to immich;
postgresql:
shared_preload_libraries:
- vectors.so
backup:
barmanObjectStore:
destinationPath: "s3://cnpg/immich"
endpointURL: "https://s3.mcswain.dev"
s3Credentials:
accessKeyId:
name: cnpg-minio
key: AWS_ACCESS_KEY_ID
secretAccessKey:
name: cnpg-minio
key: AWS_SECRET_ACCESS_KEY
wal:
compression: gzip
retentionPolicy: "4w"
storage:
size: 12Gi
monitoring:
enablePodMonitor: true
resources:
requests:
memory: 450Mi
cpu: 50m
limits:
memory: 600Mi
smartShutdownTimeout: 30
stopDelay: 300
---
apiVersion: v1
kind: Secret
metadata:
name: cnpg-minio
annotations:
reflector.v1.k8s.emberstack.com/reflects: reflector/cnpg-minio
type: Opaque
---
apiVersion: postgresql.cnpg.io/v1
kind: ScheduledBackup
metadata:
name: backup
spec:
immediate: true
schedule: "0 0 * * * *"
backupOwnerReference: self
cluster:
name: postgresql