Architecture Decision Record

ADR 010: CloudNative PG for Managed Postgres

An operator-managed Postgres with WAL archiving to MinIO, instead of one database container per application.

Status: Accepted  ·  Date: Dec 2025  ·  ← All ADRs


Context

Several applications in the cluster require Postgres: Authentik, Gitea, Paperless-NGX, Outline, and others. Options for providing it:

The core requirement was consistency: every database should be backed up the same way, recoverable to a known point in time, and managed with the same tooling.


Decision

Use CloudNative PG as the single operator for all Postgres workloads in the cluster. Applications that ship their own Postgres are configured to use CNPG-managed clusters instead.

Rather than provisioning a dedicated Cluster resource per application, run a single shared CNPG cluster with separate databases and roles per application. Each application connects with its own credentials scoped to its own database.


Reasoning


Tradeoffs


Outcome

All stateful applications in the cluster use CNPG-managed Postgres clusters. WAL is continuously archived to MinIO. Scheduled base backups run nightly. Each database is independently restorable to any point in time without affecting others.