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