Fix DB pod

This commit is contained in:
dvirlabs 2026-02-02 19:37:27 +02:00
parent 238920ddf3
commit 2c8dc8de71

View File

@ -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: