mirror of
https://github.com/immich-app/yucca.git
synced 2026-09-30 13:33:00 +08:00
feat(cnpg): enable quorum commit on the real database clusters (#613)
This commit is contained in:
@@ -11,6 +11,10 @@ spec:
|
||||
{{- with .Values.affinity }}
|
||||
affinity: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.synchronous }}
|
||||
postgresql:
|
||||
synchronous: {{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
storage:
|
||||
size: {{ .Values.storage }}
|
||||
{{- with .Values.storageClass }}
|
||||
|
||||
@@ -17,6 +17,8 @@ resources: {}
|
||||
# default "preferred" can co-schedule two instances, and local PVs
|
||||
# (WaitForFirstConsumer) then pin that co-location permanently.
|
||||
affinity: {}
|
||||
# CNPG spec.postgresql.synchronous. Empty = async, the CNPG default.
|
||||
synchronous: {}
|
||||
# Barman Cloud plugin backups (WAL archiving + daily base backup) to an
|
||||
# S3-compatible object store. Requires the plugin-barman-cloud release in
|
||||
# cnpg-system, so dev (no cert-manager, no plugin) keeps this off.
|
||||
|
||||
@@ -32,6 +32,15 @@ spec:
|
||||
# (WaitForFirstConsumer) then pin that co-location permanently.
|
||||
affinity:
|
||||
podAntiAffinityType: required
|
||||
# Quorum commit, so a lost primary can't take recent commits with it and
|
||||
# leave the DB and the object store diverged. "preferred", not "required":
|
||||
# instances sit on node-local PVs, so a dead node strands one until a human
|
||||
# replaces it, and "required" would make that a write outage.
|
||||
synchronous:
|
||||
method: any
|
||||
number: 1
|
||||
failoverQuorum: true
|
||||
dataDurability: preferred
|
||||
# Generous requests, huge memory limit (no CPU limit — CFS throttling hurts
|
||||
# postgres tail latency more than contention does).
|
||||
resources:
|
||||
|
||||
Reference in New Issue
Block a user