Files
kube-cluster/immich/immich-postgres/templates/postgres-cluster.yaml
2026-03-31 15:30:40 +00:00

43 lines
1.1 KiB
YAML

apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: {{ .Values.cluster.name }}
spec:
instances: {{ .Values.cluster.instances }}
storage:
pvcTemplate:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: postgres-storage
volumeMode: Filesystem
imageName: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
postgresql:
shared_preload_libraries:
- "vchord.so"
# Optional: you can tweak resources, monitoring, etc. here.
# resources:
# requests:
# cpu: 100m
# memory: 512Mi
# limits:
# cpu: 2
# memory: 2Gi
bootstrap:
initdb:
database: {{ .Values.database.name }}
owner: {{ .Values.database.user }}
dataChecksums: true
secret:
name: {{ ternary .Values.database.existingSecret (printf "%s-app" .Values.cluster.name) (ne .Values.database.existingSecret "") }}
postInitApplicationSQL:
- ALTER USER {{ .Values.database.user }} WITH SUPERUSER;
- CREATE EXTENSION vchord CASCADE;
- CREATE EXTENSION earthdistance CASCADE;