Skip to content

Commit b5c4665

Browse files
committed
docs: import CloudNativePG main
1 parent ba0880f commit b5c4665

3 files changed

Lines changed: 29 additions & 16 deletions

File tree

‎website/docs/cloudnative-pg.v1.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1610,7 +1610,7 @@ _Appears in:_
16101610
| `successThreshold` _integer_ | Minimum consecutive successes for the probe to be considered successful after having failed.<br />Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. | | | |
16111611
| `failureThreshold` _integer_ | Minimum consecutive failures for the probe to be considered failed after having succeeded.<br />Defaults to 3. Minimum value is 1. | | | |
16121612
| `terminationGracePeriodSeconds` _integer_ | Optional duration in seconds the pod needs to terminate gracefully upon probe failure.<br />The grace period is the duration in seconds after the processes running in the pod are sent<br />a termination signal and the time when the processes are forcibly halted with a kill signal.<br />Set this value longer than the expected cleanup time for your process.<br />If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this<br />value overrides the value provided by the pod spec.<br />Value must be non-negative integer. The value zero indicates stop immediately via<br />the kill signal (no opportunity to shut down).<br />This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate.<br />Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. | | | |
1613-
| `isolationCheck` _[IsolationCheckConfiguration](#isolationcheckconfiguration)_ | Configure the feature that extends the liveness probe for a primary<br />instance. In addition to the basic checks, this verifies whether the<br />primary is isolated from the Kubernetes API server and from its<br />replicas, ensuring that it can be safely shut down if network<br />partition or API unavailability is detected. Enabled by default. | | | |
1613+
| `isolationCheck` _[IsolationCheckConfiguration](#isolationcheckconfiguration)_ | Configure the feature that extends the liveness probe for a primary<br />instance. In addition to the basic checks, this reports whether the<br />primary is isolated from the Kubernetes API server and from its<br />replicas, so the kubelet restarts it through the normal<br />container-termination path (a smart shutdown, bounded by<br />`.spec.smartShutdownTimeout`) when a network partition or API<br />unavailability is detected. Enabled by default. | | | |
16141614

16151615

16161616

‎website/docs/failover.md‎

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,21 @@ The two mechanisms are complementary and both are enabled by default:
103103

104104
* The lease prevents *premature* promotion: a replica cannot promote
105105
while the former primary still holds the lease.
106-
* The isolation check stops an *isolated* primary from continuing to
107-
accept writes.
106+
* The isolation check reports an isolated primary as unhealthy, which
107+
the kubelet then restarts through its normal container-termination
108+
path. That path is a *smart* shutdown: it refuses new connections
109+
but lets sessions that are already open keep committing until
110+
`.spec.smartShutdownTimeout` elapses (180 seconds by default), so
111+
it narrows the write window during a partition rather than closing
112+
it outright.
108113

109114
Keep both enabled. Disabling the isolation check leaves the lease
110115
alone responsible for primary safety, and the lease alone cannot
111116
prevent split-brain when the former primary cannot reach the API
112-
server but remains otherwise healthy.
117+
server but remains otherwise healthy. If that write window matters
118+
for your workload, set `.spec.smartShutdownTimeout: 0` so the
119+
restart goes straight to a fast shutdown instead of waiting out the
120+
full window.
113121

114122
### Inspecting the primary lease
115123

@@ -275,14 +283,17 @@ mechanism, driven by `tolerationSeconds` on the
275283
`node.kubernetes.io/unreachable` `NoExecute` taint (`300s` by default). That
276284
timer does not hold up the operator's failover decision; CloudNativePG
277285
promotes a new primary as soon as the `Ready` condition flips. By that point
278-
the kubelet on the isolated node has already stopped the old PostgreSQL
279-
container locally: with the default
280-
`.spec.probes.liveness.isolationCheck.enabled: true`, the instance manager
281-
fails its own liveness probe once it can reach neither the API server nor
282-
the rest of the cluster, and the kubelet kills the container within
283-
approximately three probe periods (`~30s`). Full high availability
284-
(recreation of the old primary on a healthy node by the operator) is still
285-
gated on the taint-based eviction actually deleting the pod.
286+
the kubelet on the isolated node has already noticed the problem: with the
287+
default `.spec.probes.liveness.isolationCheck.enabled: true`, the instance
288+
manager fails its own liveness probe once it can reach neither the API
289+
server nor the rest of the cluster, and the kubelet restarts the container
290+
within approximately three probe periods (`~30s`). That restart goes
291+
through the normal termination path, a smart shutdown that lets sessions
292+
already open on the isolated primary keep committing until
293+
`.spec.smartShutdownTimeout` elapses (180 seconds by default) on top of
294+
that ~30s detection window. Full high availability (recreation of the old
295+
primary on a healthy node by the operator) is still gated on the
296+
taint-based eviction actually deleting the pod.
286297

287298
## Failover Quorum (Quorum-based Failover)
288299

‎website/docs/instance_manager.md‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ following conditions are met:
232232
1. The instance manager cannot reach the Kubernetes API server
233233
2. The instance manager cannot reach **any** other instance via the instance manager’s REST API
234234

235-
The effect of this behavior is to consider an isolated primary to be not alive and subsequently **shut it down** when the liveness probe fails.
235+
The effect of this behavior is to consider an isolated primary to be not alive: the liveness probe fails, and the kubelet restarts the container through its normal termination path. That path is a **smart** shutdown: it refuses new connections but lets sessions that are already open keep committing until `.spec.smartShutdownTimeout` elapses (180 seconds by default). Set `.spec.smartShutdownTimeout: 0` if you need the restart to skip straight to a fast shutdown instead of waiting out that window.
236236

237237
It is **enabled by default** and can be disabled by adding the following:
238238

@@ -267,9 +267,11 @@ spec:
267267

268268
:::info
269269
Primary isolation is distinct from the [safe primary election](failover.md#safe-primary-election)
270-
mechanism. The isolation check *fences* a primary that has lost connectivity to
271-
both the API server and the other instances, while the primary lease coordinates
272-
*which instance is allowed to promote*. The two mechanisms are complementary.
270+
mechanism. The isolation check reports a primary that has lost connectivity to
271+
both the API server and the other instances as unhealthy, leaving the kubelet
272+
to restart it through the normal container-termination path described above;
273+
the primary lease coordinates *which instance is allowed to promote*. The two
274+
mechanisms are complementary.
273275
:::
274276

275277
## Readiness Probe

0 commit comments

Comments
 (0)