From 2c8dc8de714389d875f152e170a509c6fc69d548 Mon Sep 17 00:00:00 2001 From: dvirlabs Date: Mon, 2 Feb 2026 19:37:27 +0200 Subject: [PATCH] Fix DB pod --- .../invy-chart/templates/db-statefulset.yaml | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/charts/invy-chart/templates/db-statefulset.yaml b/charts/invy-chart/templates/db-statefulset.yaml index 15a6c15..03b2e4a 100644 --- a/charts/invy-chart/templates/db-statefulset.yaml +++ b/charts/invy-chart/templates/db-statefulset.yaml @@ -27,16 +27,11 @@ spec: - sh - -c - | - chown -R 999:999 /var/lib/postgresql/data - chmod 700 /var/lib/postgresql/data - mkdir -p /var/run/postgresql - chown -R 999:999 /var/run/postgresql - chmod 775 /var/run/postgresql + chown -R 999:999 /var/lib/postgresql/data || true + chmod 700 /var/lib/postgresql/data || true volumeMounts: - name: postgres-data mountPath: /var/lib/postgresql/data - - name: postgres-run - mountPath: /var/run/postgresql securityContext: runAsUser: 0 containers: @@ -80,17 +75,17 @@ spec: livenessProbe: exec: command: - - pg_isready - - -U - - $(POSTGRES_USER) + - sh + - -c + - pg_isready -U $(POSTGRES_USER) -h /var/run/postgresql initialDelaySeconds: 30 periodSeconds: 10 readinessProbe: exec: command: - - pg_isready - - -U - - $(POSTGRES_USER) + - sh + - -c + - pg_isready -U $(POSTGRES_USER) -h /var/run/postgresql initialDelaySeconds: 5 periodSeconds: 5 volumes: