fix: pg pvc for outline
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -78,6 +78,22 @@ spec:
|
||||
labels:
|
||||
app: outline-postgres
|
||||
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
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user