26 lines
992 B
YAML
26 lines
992 B
YAML
# maxUnavailable: 1 (m11p5 §4).
|
|
#
|
|
# Unlike the standalone set (maxUnavailable: 0 — a single node cannot stay
|
|
# available across a drain), a 3-voter cluster tolerates losing ONE voter and
|
|
# keeps quorum (2 of 3). This PDB lets a node drain/upgrade take at most one pod
|
|
# at a time so a voluntary disruption (node drain, autoscaler, rolling upgrade)
|
|
# never breaks quorum. It does NOT protect against involuntary loss of two nodes
|
|
# at once — spread the pods (topologySpreadConstraints) and keep PVCs durable.
|
|
#
|
|
# For a cluster scaled beyond 3, maxUnavailable: 1 stays correct (an odd voter
|
|
# set of 5/7 tolerates more, but 1-at-a-time is always quorum-safe).
|
|
apiVersion: policy/v1
|
|
kind: PodDisruptionBudget
|
|
metadata:
|
|
name: tidaldb
|
|
namespace: tidaldb-cluster
|
|
labels:
|
|
app.kubernetes.io/name: tidaldb
|
|
app.kubernetes.io/part-of: tidaldb
|
|
spec:
|
|
maxUnavailable: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: tidaldb
|
|
app.kubernetes.io/component: cluster-node
|