diff --git a/kubernetes/seed/authentik/cluster.yaml b/kubernetes/seed/authentik/cluster.yaml index d957a840..a8c58a97 100644 --- a/kubernetes/seed/authentik/cluster.yaml +++ b/kubernetes/seed/authentik/cluster.yaml @@ -23,6 +23,16 @@ spec: parameters: shared_buffers: "256MB" max_connections: "400" + # Async replication makes CNPG switchover slow because the standby has + # to chase missing WAL via barman-cloud and replay queued records + # before it can promote. With one synchronous standby, the standby is + # always at the same LSN as the primary at commit time, so promote is + # near-instant. `dataDurability: preferred` falls back to async if the + # standby is down so writes don't block on standby unavailability. + synchronous: + method: any + number: 1 + dataDurability: preferred resources: requests: cpu: 200m diff --git a/kubernetes/seed/paperless/cluster.yaml b/kubernetes/seed/paperless/cluster.yaml index 0248f2ed..cb253ed5 100644 --- a/kubernetes/seed/paperless/cluster.yaml +++ b/kubernetes/seed/paperless/cluster.yaml @@ -23,6 +23,11 @@ spec: parameters: shared_buffers: "256MB" max_connections: "200" + # See ak-pg cluster.yaml for the rationale on synchronous replication. + synchronous: + method: any + number: 1 + dataDurability: preferred resources: requests: cpu: 200m