fix: pg pvc for outline

This commit is contained in:
2026-01-19 13:13:49 +01:00
parent 23e50e657c
commit 44a1403648
2 changed files with 32 additions and 0 deletions

View File

@@ -79,6 +79,22 @@ spec:
labels:
app: authentik-postgresql
spec:
# InitContainer: Bereinige lost+found Verzeichnis von Longhorn
initContainers:
- name: init-postgres-data
image: busybox:latest
command: ["sh", "-c"]
args:
- |
# Entferne lost+found Verzeichnis (wird von Longhorn/ext4 erstellt)
rm -rf /var/lib/postgresql/data/lost+found
# Stelle sicher, dass das Verzeichnis leer ist (nur bei neuem Volume)
find /var/lib/postgresql/data -mindepth 1 -maxdepth 1 ! -name "lost+found" -exec rm -rf {} + || true
securityContext:
runAsUser: 0
volumeMounts:
- name: postgres-data
mountPath: /var/lib/postgresql/data
containers:
- name: postgres
image: postgres:15-alpine