use subpath for postgres

This commit is contained in:
Nico Schottelius 2021-07-01 14:25:03 +02:00
parent 2c27e7f0a2
commit c4cc120ce9
1 changed files with 2 additions and 11 deletions

View File

@ -24,17 +24,6 @@ spec:
volumeMounts:
- name: etcletsencrypt
mountPath: "/etc/letsencrypt"
# This does not work: the running postgres will block this
# init container to work (mount) the volume again
# - name: remove-lost-found
# image: busybox
# command:
# - sh
# - -c
# - test -d /data/lost+found && rmdir /data/lost+found || exit 0
# volumeMounts:
# - name: postgres-data
# mountPath: "/data"
containers:
# This container will only start *after* the cert has been placed
- name: nginx
@ -53,9 +42,11 @@ spec:
envFrom:
- configMapRef:
name: {{ tpl .Values.identifier . }}-postgres-config
# Use subpath to avoid lost+found error
volumeMounts:
- name: postgres-data
mountPath: "/var/lib/postgresql/data"
subPath: postgres
- name: gitea
image: gitea/gitea:1.14
ports: