arrstack: use waitfordb initContainer instead of inline psql loop #386

Merged
benvin merged 1 commits from benvin/arrstack-use-waitfordb into main 2026-08-22 16:15:46 +10:00

1 Commits

Author SHA1 Message Date
unkin-agent 6018ee8221 arrstack: use waitfordb initContainer instead of inline psql loop
ci/woodpecker/pr/vector-test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/kubeconform Pipeline was successful
The sonarr/radarr/prowlarr deployments gated startup on Postgres with a
hand-written psql-in-a-shell loop running the postgres:17-alpine image.
Replace it with the purpose-built waitfordb image (v0.1.0), which reads the
same PG* env as a libpq fallback and exits 0 once SELECT 1 succeeds.

- swap image to docker-internal/waitfordb:v0.1.0 (pinned), drop the sh/psql
  command (waitfordb is the entrypoint)
- keep the existing PGHOST/PGPORT/PGDATABASE/PGUSER/PGPASSWORD env, name,
  and resources unchanged
- add WAITFORDB_TIMEOUT=5m so a stuck DB fails the pod fast, and
  WAITFORDB_SSLMODE=disable to match the in-cluster Postgres
2026-08-22 15:16:31 +10:00