Skip to content

fix: inject barman sidecar in replica clusters bootstrapped with pg_basebackup - #965

Merged
armru merged 3 commits into
cloudnative-pg:mainfrom
leonardoce:sidecar-pgbasebackup
Jun 19, 2026
Merged

armru merged 3 commits into
cloudnative-pg:mainfrom
leonardoce:sidecar-pgbasebackup

Conversation

@leonardoce

Copy link
Copy Markdown
Contributor

Replica clusters that use pg_basebackup as the bootstrap method and stream WAL from an object store were not getting the barman sidecar injected, causing WAL restore to fail silently. These clusters are now handled correctly.

@leonardoce
leonardoce requested a review from a team June 16, 2026 14:37
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working go Pull requests that update go code labels Jun 16, 2026
@leonardoce
leonardoce force-pushed the sidecar-pgbasebackup branch from a336b5a to 55a47cf Compare June 16, 2026 14:37
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jun 17, 2026
@armru
armru force-pushed the sidecar-pgbasebackup branch from 55a47cf to 70dd50f Compare June 18, 2026 12:56
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jun 18, 2026
@armru
armru force-pushed the sidecar-pgbasebackup branch from 70dd50f to 2d64d34 Compare June 18, 2026 14:48
leonardoce and others added 3 commits June 19, 2026 09:33
…asebackup

Replica clusters that use `pg_basebackup` as the bootstrap method and stream
WAL from an object store were not getting the barman sidecar injected, causing
WAL restore to fail silently. These clusters are now handled correctly.

Signed-off-by: Leonardo Cecchi <[email protected]>
…up replicas

The sidecar injected into pg_basebackup replica clusters ignored the
instanceSidecarConfiguration (resources, logLevel, additionalContainerArgs) of
the replica-source ObjectStore: collectSidecarResourcesForPod and
collectAdditionalInstanceArgs only handled the cluster and recovery object
stores. Log-shipping replicas masked this because their recovery and replica
source object stores coincide; pg_basebackup replicas only set
ReplicaSourceBarmanObjectName, so the configuration was silently dropped (the
sidecar ran with no additional args and the default log level).

Handle ReplicaSourceBarmanObjectName in both helpers, documenting the store
precedence (Barman > Recovery > ReplicaSource), and fix the misleading comment
on the recovery branch.

Signed-off-by: Armando Ruocco <[email protected]>
Add config-package tests exercising the parse path the pg_basebackup replica
fix lives in: NewFromCluster must derive ReplicaSourceBarmanObjectName from the
external cluster plugin (while leaving the backup and recovery object stores
empty) and Validate must accept it. Also assert that a replica source backed by
a different plugin is ignored.

Signed-off-by: Armando Ruocco <[email protected]>
@armru
armru force-pushed the sidecar-pgbasebackup branch from 2d64d34 to 8fbcedb Compare June 19, 2026 07:33
@armru
armru merged commit eb5e860 into cloudnative-pg:main Jun 19, 2026
4 checks passed
ajgon pushed a commit to deedee-ops/home-ops that referenced this pull request Jul 29, 2026
…oud (v0.13.0 ➔ v0.14.0) (#465)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [cloudnative-pg/plugin-barman-cloud](https://github.com/cloudnative-pg/plugin-barman-cloud) | minor | `v0.13.0` → `v0.14.0` |

---

### Release Notes

<details>
<summary>cloudnative-pg/plugin-barman-cloud (cloudnative-pg/plugin-barman-cloud)</summary>

### [`v0.14.0`](https://github.com/cloudnative-pg/plugin-barman-cloud/releases/tag/v0.14.0)

[Compare Source](cloudnative-pg/plugin-barman-cloud@v0.13.0...v0.14.0)

##### Features

- Honor the operator's check\_empty\_wal\_archive decision ([#&#8203;1009](cloudnative-pg/plugin-barman-cloud#1009)) ([7bcb74b](cloudnative-pg/plugin-barman-cloud@7bcb74b))

##### Bug Fixes

- **deps:** Update all non-major go dependencies ([#&#8203;963](cloudnative-pg/plugin-barman-cloud#963)) ([f949241](cloudnative-pg/plugin-barman-cloud@f949241))
- **deps:** Update all non-major go dependencies ([#&#8203;979](cloudnative-pg/plugin-barman-cloud#979)) ([bf52833](cloudnative-pg/plugin-barman-cloud@bf52833))
- **deps:** Update all non-major go dependencies ([#&#8203;982](cloudnative-pg/plugin-barman-cloud#982)) ([5f84ecc](cloudnative-pg/plugin-barman-cloud@5f84ecc))
- **deps:** Update all non-major go dependencies to [`53ffbf0`](cloudnative-pg/plugin-barman-cloud@53ffbf0) ([#&#8203;973](cloudnative-pg/plugin-barman-cloud#973)) ([7190349](cloudnative-pg/plugin-barman-cloud@7190349))
- **deps:** Update all non-major go dependencies to [`592f761`](cloudnative-pg/plugin-barman-cloud@592f761) ([#&#8203;972](cloudnative-pg/plugin-barman-cloud#972)) ([2fa63c4](cloudnative-pg/plugin-barman-cloud@2fa63c4))
- **deps:** Update all non-major go dependencies to [`8d9302e`](cloudnative-pg/plugin-barman-cloud@8d9302e) ([#&#8203;975](cloudnative-pg/plugin-barman-cloud#975)) ([0c687cb](cloudnative-pg/plugin-barman-cloud@0c687cb))
- **deps:** Update all non-major go dependencies to v2.30.0 ([#&#8203;957](cloudnative-pg/plugin-barman-cloud#957)) ([61b82ce](cloudnative-pg/plugin-barman-cloud@61b82ce))
- **deps:** Update documentation dependencies to v3.10.2 ([#&#8203;1001](cloudnative-pg/plugin-barman-cloud#1001)) ([88f2e29](cloudnative-pg/plugin-barman-cloud@88f2e29))
- **deps:** Update github.com/cloudnative-pg/barman-cloud digest to [`950b0f5`](cloudnative-pg/plugin-barman-cloud@950b0f5) ([#&#8203;1022](cloudnative-pg/plugin-barman-cloud#1022)) ([98537c4](cloudnative-pg/plugin-barman-cloud@98537c4))
- **deps:** Update k8s.io/utils digest to [`a95e086`](cloudnative-pg/plugin-barman-cloud@a95e086) ([#&#8203;968](cloudnative-pg/plugin-barman-cloud#968)) ([f7f0136](cloudnative-pg/plugin-barman-cloud@f7f0136))
- **deps:** Update k8s.io/utils digest to [`be93311`](cloudnative-pg/plugin-barman-cloud@be93311) ([#&#8203;986](cloudnative-pg/plugin-barman-cloud#986)) ([2cc4e99](cloudnative-pg/plugin-barman-cloud@2cc4e99))
- **deps:** Update kubernetes monorepo to v0.36.2 ([#&#8203;958](cloudnative-pg/plugin-barman-cloud#958)) ([030b28c](cloudnative-pg/plugin-barman-cloud@030b28c))
- **deps:** Update kubernetes monorepo to v0.36.3 ([#&#8203;1031](cloudnative-pg/plugin-barman-cloud#1031)) ([ce81794](cloudnative-pg/plugin-barman-cloud@ce81794))
- **deps:** Update module github.com/cloudnative-pg/cnpg-i to v0.6.0 ([#&#8203;1021](cloudnative-pg/plugin-barman-cloud#1021)) ([13450a3](cloudnative-pg/plugin-barman-cloud@13450a3))
- **deps:** Update module google.golang.org/grpc to v1.82.1 ([#&#8203;1008](cloudnative-pg/plugin-barman-cloud#1008)) ([3c27364](cloudnative-pg/plugin-barman-cloud@3c27364))
- **docs:** Fix broken anchor link in concepts.md ([#&#8203;1013](cloudnative-pg/plugin-barman-cloud#1013)) ([9c84d06](cloudnative-pg/plugin-barman-cloud@9c84d06))
- Inject barman sidecar in replica clusters bootstrapped with pg\_basebackup ([#&#8203;965](cloudnative-pg/plugin-barman-cloud#965)) ([eb5e860](cloudnative-pg/plugin-barman-cloud@eb5e860))
- Reduce startupProbe periodSeconds without losing failure tolerance ([#&#8203;992](cloudnative-pg/plugin-barman-cloud#992)) ([bf95543](cloudnative-pg/plugin-barman-cloud@bf95543)), refs [#&#8203;991](cloudnative-pg/plugin-barman-cloud#991)
- Restore WAL from replica source during designated primary promotion ([#&#8203;966](cloudnative-pg/plugin-barman-cloud#966)) ([c34b232](cloudnative-pg/plugin-barman-cloud@c34b232))
- **walrestore:** Serve pg\_rewind without prefetching and flag machinery ([#&#8203;1007](cloudnative-pg/plugin-barman-cloud#1007)) ([fb3f0f9](cloudnative-pg/plugin-barman-cloud@fb3f0f9))

</details>

---

### Configuration

📅 **Schedule**: (in timezone Europe/Warsaw)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yODUuMiIsInVwZGF0ZWRJblZlciI6IjQzLjI4NS4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbInJlbm92YXRlL2dpdGh1Yi1yZWxlYXNlIiwidHlwZS9taW5vciJdfQ==-->

Reviewed-on: https://git.ajgon.casa/deedee/mark13/pulls/465
renovate Bot added a commit to sdwilsh/ansible-playbooks that referenced this pull request Jul 30, 2026
…v0.14.0

##### [\`v0.14.0\`](https://github.com/cloudnative-pg/plugin-barman-cloud/releases/tag/v0.14.0)

##### Features

- Honor the operator's check\_empty\_wal\_archive decision ([#1009](cloudnative-pg/plugin-barman-cloud#1009)) ([7bcb74b](cloudnative-pg/plugin-barman-cloud@7bcb74b))

##### Bug Fixes

- **deps:** Update all non-major go dependencies ([#963](cloudnative-pg/plugin-barman-cloud#963)) ([f949241](cloudnative-pg/plugin-barman-cloud@f949241))
- **deps:** Update all non-major go dependencies ([#979](cloudnative-pg/plugin-barman-cloud#979)) ([bf52833](cloudnative-pg/plugin-barman-cloud@bf52833))
- **deps:** Update all non-major go dependencies ([#982](cloudnative-pg/plugin-barman-cloud#982)) ([5f84ecc](cloudnative-pg/plugin-barman-cloud@5f84ecc))
- **deps:** Update all non-major go dependencies to [`53ffbf0`](cloudnative-pg/plugin-barman-cloud@53ffbf0) ([#973](cloudnative-pg/plugin-barman-cloud#973)) ([7190349](cloudnative-pg/plugin-barman-cloud@7190349))
- **deps:** Update all non-major go dependencies to [`592f761`](cloudnative-pg/plugin-barman-cloud@592f761) ([#972](cloudnative-pg/plugin-barman-cloud#972)) ([2fa63c4](cloudnative-pg/plugin-barman-cloud@2fa63c4))
- **deps:** Update all non-major go dependencies to [`8d9302e`](cloudnative-pg/plugin-barman-cloud@8d9302e) ([#975](cloudnative-pg/plugin-barman-cloud#975)) ([0c687cb](cloudnative-pg/plugin-barman-cloud@0c687cb))
- **deps:** Update all non-major go dependencies to v2.30.0 ([#957](cloudnative-pg/plugin-barman-cloud#957)) ([61b82ce](cloudnative-pg/plugin-barman-cloud@61b82ce))
- **deps:** Update documentation dependencies to v3.10.2 ([#1001](cloudnative-pg/plugin-barman-cloud#1001)) ([88f2e29](cloudnative-pg/plugin-barman-cloud@88f2e29))
- **deps:** Update github.com/cloudnative-pg/barman-cloud digest to [`950b0f5`](cloudnative-pg/plugin-barman-cloud@950b0f5) ([#1022](cloudnative-pg/plugin-barman-cloud#1022)) ([98537c4](cloudnative-pg/plugin-barman-cloud@98537c4))
- **deps:** Update k8s.io/utils digest to [`a95e086`](cloudnative-pg/plugin-barman-cloud@a95e086) ([#968](cloudnative-pg/plugin-barman-cloud#968)) ([f7f0136](cloudnative-pg/plugin-barman-cloud@f7f0136))
- **deps:** Update k8s.io/utils digest to [`be93311`](cloudnative-pg/plugin-barman-cloud@be93311) ([#986](cloudnative-pg/plugin-barman-cloud#986)) ([2cc4e99](cloudnative-pg/plugin-barman-cloud@2cc4e99))
- **deps:** Update kubernetes monorepo to v0.36.2 ([#958](cloudnative-pg/plugin-barman-cloud#958)) ([030b28c](cloudnative-pg/plugin-barman-cloud@030b28c))
- **deps:** Update kubernetes monorepo to v0.36.3 ([#1031](cloudnative-pg/plugin-barman-cloud#1031)) ([ce81794](cloudnative-pg/plugin-barman-cloud@ce81794))
- **deps:** Update module github.com/cloudnative-pg/cnpg-i to v0.6.0 ([#1021](cloudnative-pg/plugin-barman-cloud#1021)) ([13450a3](cloudnative-pg/plugin-barman-cloud@13450a3))
- **deps:** Update module google.golang.org/grpc to v1.82.1 ([#1008](cloudnative-pg/plugin-barman-cloud#1008)) ([3c27364](cloudnative-pg/plugin-barman-cloud@3c27364))
- **docs:** Fix broken anchor link in concepts.md ([#1013](cloudnative-pg/plugin-barman-cloud#1013)) ([9c84d06](cloudnative-pg/plugin-barman-cloud@9c84d06))
- Inject barman sidecar in replica clusters bootstrapped with pg\_basebackup ([#965](cloudnative-pg/plugin-barman-cloud#965)) ([eb5e860](cloudnative-pg/plugin-barman-cloud@eb5e860))
- Reduce startupProbe periodSeconds without losing failure tolerance ([#992](cloudnative-pg/plugin-barman-cloud#992)) ([bf95543](cloudnative-pg/plugin-barman-cloud@bf95543)), refs [#991](cloudnative-pg/plugin-barman-cloud#991)
- Restore WAL from replica source during designated primary promotion ([#966](cloudnative-pg/plugin-barman-cloud#966)) ([c34b232](cloudnative-pg/plugin-barman-cloud@c34b232))
- **walrestore:** Serve pg\_rewind without prefetching and flag machinery ([#1007](cloudnative-pg/plugin-barman-cloud#1007)) ([fb3f0f9](cloudnative-pg/plugin-barman-cloud@fb3f0f9))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working go Pull requests that update go code lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants