diff --git a/charts/invy-chart/templates/db-statefulset.yaml b/charts/invy-chart/templates/db-statefulset.yaml index e5293e4..2a11b4a 100644 --- a/charts/invy-chart/templates/db-statefulset.yaml +++ b/charts/invy-chart/templates/db-statefulset.yaml @@ -75,12 +75,13 @@ spec: # Health probes aligned with tasko-chart approach # Use TCP localhost instead of Unix socket to avoid permission issues # Fixed shell variable expansion: $POSTGRES_USER not $(POSTGRES_USER) + # Specify database name to avoid "database invy_user does not exist" error startupProbe: exec: command: - sh - -c - - pg_isready -h 127.0.0.1 -p 5432 -U "$POSTGRES_USER" + - pg_isready -h 127.0.0.1 -p 5432 -U "$POSTGRES_USER" -d "$POSTGRES_DB" initialDelaySeconds: 10 periodSeconds: 5 timeoutSeconds: 5 @@ -90,7 +91,7 @@ spec: command: - sh - -c - - pg_isready -h 127.0.0.1 -p 5432 -U "$POSTGRES_USER" + - pg_isready -h 127.0.0.1 -p 5432 -U "$POSTGRES_USER" -d "$POSTGRES_DB" initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 @@ -100,7 +101,7 @@ spec: command: - sh - -c - - pg_isready -h 127.0.0.1 -p 5432 -U "$POSTGRES_USER" + - pg_isready -h 127.0.0.1 -p 5432 -U "$POSTGRES_USER" -d "$POSTGRES_DB" initialDelaySeconds: 5 periodSeconds: 5 timeoutSeconds: 3