Files
kube-single-age/clusters/base/apps/immich/helmrelease-postgres.yaml
T
2026-08-21 15:37:25 +03:00

71 lines
2.0 KiB
YAML

apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: immich-postgres
namespace: photo
spec:
interval: 30m
chartRef:
kind: OCIRepository
name: immich
driftDetection:
mode: enabled
values:
controllers:
postgres:
containers:
app:
# immich requires this specific image - it bundles the
# vectorchord/pgvecto.rs extensions immich's DB schema depends
# on; a plain postgres image will not work.
image:
repository: ghcr.io/immich-app/postgres
tag: 14-vectorchord0.4.3-pgvectors0.2.0
env:
TZ: Europe/Moscow
POSTGRES_USER: postgres
POSTGRES_DB: immich
POSTGRES_INITDB_ARGS: "--data-checksums"
POSTGRES_PASSWORD:
valueFrom:
secretKeyRef:
name: immich-secrets
key: DB_PASSWORD
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
memory: 2Gi
service:
app:
controller: postgres
ports:
postgres:
port: 5432
persistence:
data:
type: persistentVolumeClaim
accessMode: ReadWriteOnce
size: 10Gi
storageClass: longhorn
retain: true
globalMounts:
# subPath, not the raw mount root: a fresh Longhorn ext4 volume's
# root always contains a "lost+found" dir, and postgres's initdb
# refuses to initialize into a non-empty directory even when
# lost+found is the only thing in it.
- path: /var/lib/postgresql/data
subPath: data
# postgres' parallel query workers need real shared memory, not the
# default 64Mi container tmpfs - matches shm_size: 128mb in the
# original docker-compose.
dshm:
type: emptyDir
medium: Memory
sizeLimit: 128Mi
globalMounts:
- path: /dev/shm