arrstack: fix sync-wave deadlock + config multi-attach #385
Reference in New Issue
Block a user
Delete Branch "benvin/arrstack-deploy-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The active-active arrstack deploy (#383) is stuck in-cluster: the app Deployments (sync-wave 0) can never become Healthy without their Postgres DB, so ArgoCD never advances to create the shared
arrstack-postgrescluster (wave 1). Separately,/configis an immutable RWO cephrbd PVC, so 3 replicas fail with Multi-Attach.How
<app>-dbVaultStaticSecrets + backup ObjectStoreUser/Bucket at sync-wave -3, CNPGCluster-2,DatabaseCRDs -1; app Deployments stay at default 0./configto an emptyDir per-pod volume (library DB is in Postgres, config is env-driven; MediaCover regenerates). Old RWO config PVCs orphan.Validated with kustomize build (62 resources). arrproxy/nzbget untouched.
Updated per feedback: replaced the ArgoCD sync-wave ordering with a wait-for-db initContainer on each app (the sync-wave health-gating is exactly what deadlocked the first deploy). Now:
until psql 'select 1'against its own database+role (<app>-main, creds from the<app>-dbsecret via libpq PG* env — password never in argv), blocking the app container until Postgres + the role + the DB are actually ready.kustomize build clean (62 resources).