---
id: w1/m2/t001
title: Provision Postgres (CNPG bex-db)
worker: worker1
status: done
estimate: —
depends_on: []
---

## Objective

Provide the control plane's durable, queryable store. **Already shipped** (task 005a).

## Context

- GitOps: `deploy/gitops/base/cnpg-operator.yaml` + `bex-postgres.yaml` + `charts/bex-postgres/`. All Argo apps Synced/Healthy.
- Connect: service `bex-db-rw.bex-system.svc:5432`, database `bex`, creds in Secret `bex-system/bex-db-app` (keys `username`/`password`/`uri`/`jdbc-uri`).
- Storage: PVC on `hcloud-volumes` (survives node rebuild).
- Gotcha: CNPG CRDs exceed kubectl's 256KB annotation cap → the cnpg-operator Argo app needs `ServerSideApply=true` (committed).

## Acceptance criteria

- [x] `bex-db` Cluster is Ready; the app can reach it via `bex-db-app`.

## Out of scope

- HA (`instances:3`) + Wasabi backups — later bumps.
