Add init container to clean PostgreSQL data directory
This commit is contained in:
@@ -14,6 +14,17 @@ spec:
|
||||
labels:
|
||||
app: invidious-db
|
||||
spec:
|
||||
initContainers:
|
||||
- name: clean-db-dir
|
||||
image: busybox
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
rm -rf /var/lib/postgresql/data/lost+found
|
||||
volumeMounts:
|
||||
- name: postgres-data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:14
|
||||
@@ -61,4 +72,4 @@ spec:
|
||||
volumes:
|
||||
- name: postgres-data
|
||||
persistentVolumeClaim:
|
||||
claimName: longhorn-invidious-config
|
||||
claimName: longhorn-invidious-config
|
||||
|
||||
Reference in New Issue
Block a user