docs: improve

Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
This commit is contained in:
Francesco Canovai 2025-05-09 17:10:59 +02:00
parent ef7afbbc29
commit 74916768dd

View File

@ -213,13 +213,25 @@ spec:
## Configuring the plugin instance sidecar
The Barman Cloud Plugin uses a sidecar container that runs alongside each
PostgreSQL instance pod.
The Barman Cloud Plugin runs as a sidecar container next to each PostgreSQL
instance pod. It manages backup, WAL archiving, and restore processes.
This sidecar handles backup, WAL archiving, and restore
operations. You can control how the sidecar works by setting the
`.spec.instanceSidecarConfiguration` section in your `ObjectStore` resource.
These settings apply to all PostgreSQL instances that use this object store.
Configuration comes from multiple `ObjectStore` resources:
1. The one referenced in the
`.spec.plugins` section of the `Cluster`. This is the
object store used for WAL archiving and base backups.
2. The one referenced in the external cluster
used in the `.spec.replica.source` section of the `Cluster`. This is
used by the log-shipping designated primary to get the WAL files.
3. The one referenced in the
`.spec.bootstrap.recovery.source` section of the `Cluster`. Used by
the initial recovery job to create the cluster from an existing backup.
You can fine-tune sidecar behavior in the `.spec.instanceSidecarConfiguration`
of your ObjectStore. These settings apply to all PostgreSQL instances that use
this object store. Any updates take effect at the next `Cluster` reconciliation,
and could generate a rollout of the `Cluster`.
```yaml
apiVersion: barmancloud.cnpg.io/v1
@ -233,34 +245,14 @@ spec:
retentionPolicyIntervalSeconds: 1800
resources:
requests:
memory: "64Mi"
cpu: "250m"
memory: "XXX"
cpu: "YYY"
limits:
memory: "512Mi"
cpu: "500m"
memory: "XXX"
cpu: "YYY"
```
The plugin injects a sidecar in the recovery job and in the PostgreSQL
instance Pods when needed.
When this happens, the sidecar will manage multiple `ObjectStore`
resources:
1. the target object store, where WAL files and backups will
be written
2. the replica source object store, used by the log-shipping designated
primary to get the WAL files
3. the recovery object store, used when creating the cluster from an
existing backup (used only by the recovery job)
The resources defined by the recovery object store will be used when
injecting the sidecar in the recovery job.
If a sidecar is needed by PG instances pod, the resources defined in
the target object store will be used. Should this object store be not
defined, the replica object store will be used.
Changes to the sidecar configuration will be applied on the next
reconciliation of the `Cluster` resources it.
:::note
If more than one `ObjectStore` applies, the `instanceSidecarConfiguration` of
the one set in `.spec.plugins` has priority.
:::