From fd6f3e9b10122e4b40a458f164dcd1c25663ec4a Mon Sep 17 00:00:00 2001 From: Francesco Canovai Date: Fri, 9 May 2025 12:12:16 +0200 Subject: [PATCH] docs: describe instanceSidecarConfiguration Document how the instance sidecar is configured and what happens when resources definitions conflict between objectstores. Signed-off-by: Francesco Canovai --- web/docs/usage.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/web/docs/usage.md b/web/docs/usage.md index 1c464e8..9521c0d 100644 --- a/web/docs/usage.md +++ b/web/docs/usage.md @@ -210,3 +210,37 @@ spec: parameters: barmanObjectName: minio-store-b ``` + +## Configuring the plugin instance sidecar + +The Barman Cloud Plugin uses a sidecar container that runs alongside each +PostgreSQL instance pod. 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. + +```yaml +apiVersion: barmancloud.cnpg.io/v1 +kind: ObjectStore +metadata: + name: minio-store +spec: + configuration: + # [...] + instanceSidecarConfiguration: + retentionPolicyIntervalSeconds: 30 + resources: + requests: + memory: "64Mi" + cpu: "250m" + limits: + memory: "512Mi" + cpu: "500m" +``` + +When the plugin is enabled, the sidecar is automatically injected into each +PostgreSQL instance pod. Even if you define multiple `ObjectStore` resources, +only one sidecar will run per instance. If a replica cluster also archives WALs +to a different `ObjectStore`, the sidecar will use the resource settings from the +`ObjectStore` referenced by the archiving plugin, not the one in the +`.spec.externalClusters` section.