Barman Cloud CNPG-I backup plugin
Go to file
Marco Nenciarini fb3397386c fix: stop keeping the sidecar forever on recovery-only clusters
A cluster bootstrapped only via RecoveryBarmanObjectName, with no
continuing archiving or replica source, only ever needs the sidecar
for its one-time bootstrap restore. Gate its injection on
cluster.Status.CurrentPrimary being unset, so it stops being added
once that instance is up.

CurrentPrimary is set by the instance manager itself, from inside the
primary pod, only once it has completed its own bootstrap - unlike
cluster.Status.Instances / IsInitialized(), which flips as soon as the
instance's PVC exists, well before the pod is even created. Gating on
IsInitialized() would mean the sidecar is never added to the one pod
that needs it to perform its restore.

Once CurrentPrimary is set, this makes the operator's own drift-check
see the already-running pod's spec as outdated and roll it out to drop
the sidecar. That is deliberately accepted rather than engineered
around: it is one deterministic rollout using the same machinery the
operator already uses for every other pod-spec change (a switchover if
a replica is available, an in-place restart otherwise), not a new or
fragile risk.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
2026-08-27 09:27:32 +02:00
.github/workflows chore(deps): update dependency dagger/dagger to v0.21.8 (#1043) 2026-08-15 11:20:22 +02:00
api/v1 fix(deps): update module sigs.k8s.io/controller-runtime to v0.24.0 (#880) 2026-05-06 10:15:29 +02:00
cmd/manager feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
config fix: classify WAL restore errors with precise gRPC statuses (#927) 2026-06-03 11:25:07 +02:00
containers chore(deps): bump cryptography from 49.0.0 to 50.0.0 in /containers (#1052) 2026-08-14 17:31:56 +02:00
dagger chore(deps): bump dagger module deps (#1067) 2026-08-17 11:52:05 +02:00
hack fix: inject barman sidecar in replica clusters bootstrapped with pg_basebackup (#965) 2026-06-19 10:18:36 +02:00
internal fix: stop keeping the sidecar forever on recovery-only clusters 2026-08-27 09:27:32 +02:00
kubernetes test(e2e): use correct image name in kustomize overlay (#841) 2026-04-11 13:31:31 +02:00
logo Initial commit 2024-09-24 14:52:25 +02:00
scripts feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
test/e2e chore(deps): update amazon/aws-cli docker tag to v2.36.24 (#1038) 2026-08-15 14:36:24 +02:00
web docs: remove old unmaintained docs from web (#1063) 2026-08-18 12:35:34 +02:00
.dockerignore chore: scaffold (#2) 2024-09-26 11:52:56 +02:00
.gitignore ci: add e2e kustomization.yaml to .gitignore (#112) 2024-12-16 11:04:39 +01:00
.golangci.yml fix(deps): update module sigs.k8s.io/controller-runtime to v0.24.0 (#880) 2026-05-06 10:15:29 +02:00
.release-please-manifest.json chore(main): release 0.14.0 (#964) 2026-07-29 12:00:23 +02:00
.spellcheck.yaml chore: limit the spellchecking to a fixed list of directories (#294) 2025-05-05 10:21:18 +02:00
.wordlist.txt fix: add lz4 compression support for base backups (#868) 2026-04-21 19:23:45 +02:00
CHANGELOG.md chore(main): release 0.14.0 (#964) 2026-07-29 12:00:23 +02:00
CODE_OF_CONDUCT.md Initial commit 2024-09-24 14:52:25 +02:00
CODEOWNERS chore: sync CODEOWNERS with cnpg-infra policy (#1047) 2026-08-06 19:30:12 +10:00
commitlint.config.js ci: warn on long commit body line (#12) 2024-09-27 10:07:47 +02:00
CONTRIBUTING.md docs: add CONTRIBUTING.md file 2026-03-02 17:03:09 +11:00
go.mod fix(deps): update all non-major go dependencies (#1041) 2026-08-15 11:37:46 +02:00
go.sum fix(deps): update all non-major go dependencies (#1041) 2026-08-15 11:37:46 +02:00
GOVERNANCE.md Initial commit 2024-09-24 14:52:25 +02:00
LICENSE Initial commit 2024-09-24 14:52:25 +02:00
Makefile fix: add cluster/finalizers update permission (#465) 2025-08-14 22:55:25 +02:00
manifest.yaml fix: classify WAL restore errors with precise gRPC statuses (#927) 2026-06-03 11:25:07 +02:00
PROJECT chore: scaffold (#2) 2024-09-26 11:52:56 +02:00
README.md docs: release procedure (#373) 2025-05-29 17:52:44 +02:00
release-please-config.json ci: update version in metadata (#229) 2025-03-25 17:21:56 +01:00
RELEASE-PROCEDURE.md docs: release procedure (#373) 2025-05-29 17:52:44 +02:00
renovate.json5 chore(renovate): stop ignoring test/e2e/internal/tests/** (#996) 2026-07-09 11:00:04 +02:00
Taskfile.yml chore(deps): update golangci/golangci-lint docker tag to v2.13.1 (#1078) 2026-08-27 09:27:03 +02:00

CloudNativePG

Barman Cloud CNPG-I plugin for CloudNativePG

The documentation for the Barman Cloud Plugin for CloudNativePG is available at https://cloudnative-pg.io/plugin-barman-cloud.


The Barman Cloud CNPG-I plugin is a component of the CloudNativePG project and adheres to the same community-driven governance model under the CNCF.

CNCF logo


CloudNativePG was originally built and sponsored by EDB.

EDB logo


Postgres, PostgreSQL, and the Slonik Logo are trademarks or registered trademarks of the PostgreSQL Community Association of Canada, and used with their permission.