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 - sh
- -c - -c
- | - |
chown -R 999:999 /var/lib/postgresql/data chown -R 999:999 /var/lib/postgresql/data || true
chmod 700 /var/lib/postgresql/data chmod 700 /var/lib/postgresql/data || true
mkdir -p /var/run/postgresql
chown -R 999:999 /var/run/postgresql
chmod 775 /var/run/postgresql
volumeMounts: volumeMounts:
- name: postgres-data - name: postgres-data
mountPath: /var/lib/postgresql/data mountPath: /var/lib/postgresql/data
- name: postgres-run
mountPath: /var/run/postgresql
securityContext: securityContext:
runAsUser: 0 runAsUser: 0
containers: containers:
@ -80,17 +75,17 @@ spec:
livenessProbe: livenessProbe:
exec: exec:
command: command:
- pg_isready - sh
- -U - -c
- $(POSTGRES_USER) - pg_isready -U $(POSTGRES_USER) -h /var/run/postgresql
initialDelaySeconds: 30 initialDelaySeconds: 30
periodSeconds: 10 periodSeconds: 10
readinessProbe: readinessProbe:
exec: exec:
command: command:
- pg_isready - sh
- -U - -c
- $(POSTGRES_USER) - pg_isready -U $(POSTGRES_USER) -h /var/run/postgresql
initialDelaySeconds: 5 initialDelaySeconds: 5
periodSeconds: 5 periodSeconds: 5
volumes: volumes: