From c4cc120ce9053d49b920d50cdf2de8151d0ccb1e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 1 Jul 2021 14:25:03 +0200 Subject: [PATCH] use subpath for postgres --- apps/gitea/templates/deployment.yaml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/apps/gitea/templates/deployment.yaml b/apps/gitea/templates/deployment.yaml index ece7e31..d404560 100644 --- a/apps/gitea/templates/deployment.yaml +++ b/apps/gitea/templates/deployment.yaml @@ -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: