Skip to content

Commit 6cff869

Browse files
committed
docs: import CloudNativePG main
1 parent 4119eef commit 6cff869

File tree

3 files changed

+54
-22
lines changed

3 files changed

+54
-22
lines changed

website/docs/cloudnative-pg.v1.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,10 @@ _Appears in:_
275275
| `backupId` _string_ | The ID of the Barman backup | | | |
276276
| `backupName` _string_ | The Name of the Barman backup | | | |
277277
| `phase` _[BackupPhase](#backupphase)_ | The last backup status | | | |
278-
| `startedAt` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#time-v1-meta)_ | When the backup was started | | | |
279-
| `stoppedAt` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#time-v1-meta)_ | When the backup was terminated | | | |
278+
| `startedAt` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#time-v1-meta)_ | When the backup execution was started by the backup tool | | | |
279+
| `stoppedAt` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#time-v1-meta)_ | When the backup execution was terminated by the backup tool | | | |
280+
| `reconciliationStartedAt` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#time-v1-meta)_ | When the backup process was started by the operator | | | |
281+
| `reconciliationTerminatedAt` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#time-v1-meta)_ | When the reconciliation was terminated by the operator (either successfully or not) | | | |
280282
| `beginWal` _string_ | The starting WAL | | | |
281283
| `endWal` _string_ | The ending WAL | | | |
282284
| `beginLSN` _string_ | The starting xlog | | | |
@@ -2230,7 +2232,7 @@ _Appears in:_
22302232
| `targetXID` _string_ | The target transaction ID | | | |
22312233
| `targetName` _string_ | The target name (to be previously created<br />with `pg_create_restore_point`) | | | |
22322234
| `targetLSN` _string_ | The target LSN (Log Sequence Number) | | | |
2233-
| `targetTime` _string_ | The target time as a timestamp in the RFC3339 standard | | | |
2235+
| `targetTime` _string_ | The target time as a timestamp in RFC3339 format or PostgreSQL timestamp format.<br />Timestamps without an explicit timezone are interpreted as UTC. | | | |
22342236
| `targetImmediate` _boolean_ | End recovery as soon as a consistent state is reached | | | |
22352237
| `exclusive` _boolean_ | Set the target to be exclusive. If omitted, defaults to false, so that<br />in Postgres, `recovery_target_inclusive` will be true | | | |
22362238

website/docs/connection_pooling.md

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,38 @@ replicate similar behavior to the default setup.
221221

222222
## Pod templates
223223

224-
You can take advantage of pod templates specification in the `template`
225-
section of a `Pooler` resource. For details, see
226-
[`PoolerSpec`](cloudnative-pg.v1.md#poolerspec) in the API reference.
227224

228-
Using templates, you can configure pods as you like, including fine control
229-
over affinity and anti-affinity rules for pods and nodes. By default,
230-
containers use images from `ghcr.io/cloudnative-pg/pgbouncer`.
225+
The `Pooler` resource allows you to customize the underlying pods via the
226+
`template` section. This provides full access to the Kubernetes `PodSpec` for
227+
advanced configurations like scheduling constraints, custom security contexts,
228+
or resource overrides.
231229

232-
This example shows `Pooler` specifying `PodAntiAffinity``:
230+
For a complete list of supported fields, see the
231+
[`PoolerSpec`](cloudnative-pg.v1.md#poolerspec) API reference.
232+
233+
### Key requirements
234+
235+
- **The `pgbouncer` container name:** When overriding container settings (like
236+
images or resources), the name of the container **must** be set to
237+
`pgbouncer`. The operator looks for this specific name to manage the
238+
PgBouncer process.
239+
240+
- **Mandatory `containers` field:** Since `template` follows the standard
241+
Kubernetes `PodSpec` schema, the `containers` field is mandatory.
242+
243+
- If you aren't modifying container-level settings, you must set it to an empty
244+
array: `containers: []`.
245+
246+
- If the `containers` field is missing, the API server will throw a
247+
`ValidationError`.
248+
249+
### Examples
250+
251+
#### High availability with pod anti-affinity
252+
253+
This configuration uses `podAntiAffinity` to ensure that PgBouncer pods are
254+
distributed across different nodes, preventing a single node failure from
255+
taking down the entire pool.
233256

234257
```yaml
235258
apiVersion: postgresql.cnpg.io/v1
@@ -260,16 +283,10 @@ spec:
260283
topologyKey: "kubernetes.io/hostname"
261284
```
262285

263-
:::note
264-
Explicitly set `.spec.template.spec.containers` to `[]` when not modified,
265-
as it's a required field for a `PodSpec`. If `.spec.template.spec.containers`
266-
isn't set, the Kubernetes api-server returns the following error when trying to
267-
apply the manifest:`error validating "pooler.yaml": error validating data:
268-
ValidationError(Pooler.spec.template.spec): missing required field
269-
"containers"`
270-
:::
286+
#### Custom image and resource limits
271287

272-
This example sets resources and changes the used image:
288+
You can specify a custom image and define resource requests/limits. Note that
289+
the container name is explicitly set to `pgbouncer`.
273290

274291
```yaml
275292
apiVersion: postgresql.cnpg.io/v1
@@ -288,6 +305,7 @@ spec:
288305
app: pooler
289306
spec:
290307
containers:
308+
# This name MUST be "pgbouncer"
291309
- name: pgbouncer
292310
image: my-pgbouncer:latest
293311
resources:

website/docs/recovery.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ spec:
367367
kind: VolumeSnapshot
368368
apiGroup: snapshot.storage.k8s.io
369369
recoveryTarget:
370-
targetTime: "2023-07-06T08:00:39"
370+
targetTime: "2023-07-06T08:00:39Z"
371371
externalClusters:
372372
- name: origin
373373
plugin:
@@ -405,9 +405,21 @@ Here are the recovery target criteria you can use:
405405

406406
targetTime
407407
: Time stamp up to which recovery proceeds, expressed in
408-
[RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) format.
408+
[RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) format, or as a
409+
[timestamp](https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-RECOVERY-TARGET-TIME).
409410
(The precise stopping point is also influenced by the `exclusive` option.)
410411

412+
:::note
413+
Timestamps without an explicit timezone suffix
414+
(e.g., `2023-07-06 08:00:39`) are interpreted as UTC.
415+
:::
416+
417+
:::warning
418+
Always specify an explicit timezone in your timestamp to avoid ambiguity.
419+
For example, use `2023-07-06T08:00:39Z` or `2023-07-06T08:00:39+02:00`
420+
instead of `2023-07-06 08:00:39`.
421+
:::
422+
411423
:::warning
412424
PostgreSQL recovery will stop when it encounters the first transaction that
413425
occurs after the specified time. If no such transaction exists after the
@@ -623,4 +635,4 @@ data.
623635
cluster. However, this is strongly discouraged unless you are highly
624636
familiar with PostgreSQL's recovery process. Skipping the check incorrectly can
625637
lead to severe data loss. Use with caution and only in expert scenarios.
626-
:::
638+
:::

0 commit comments

Comments
 (0)