Skip to content

feat( cluster ): plugins and barman cloud cnpg-i plugin support#924

Open
itay-grudev wants to merge 44 commits into
mainfrom
feat/barman-plugin-support
Open

feat( cluster ): plugins and barman cloud cnpg-i plugin support#924
itay-grudev wants to merge 44 commits into
mainfrom
feat/barman-plugin-support

Conversation

@itay-grudev

@itay-grudev itay-grudev commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Migrating from the Built-in CloudNativePG Backup to the Barman Cloud CNPG-I
plugin is a straightforward, single step process, as the chart creates the
necessary ObjectStore resource as a helm hook before the cluster is updated.

All you have to do is change the backup method from barmanObjectStore to
plugin and specify the plugin name. The same change should also be applied to
your scheduled backups.

backups:
  enabled: true
- method: barmanObjectStore
+ method: plugin
+ pluginConfiguration:
+   name: barman-cloud.cloudnative-pg.io
  scheduledBackups:
    - name: daily-backup
      schedule: "0 0 0 * * *"
      backupOwnerReference: self
-     method: barmanObjectStore
+     method: plugin
+     pluginConfiguration:
+       name: barman-cloud.cloudnative-pg.io

closes: #830
closes: #910
closes: #838
closes: #775

Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
@itay-grudev itay-grudev added the chart( cluster ) Related to the cluster chart label Jun 20, 2026
@itay-grudev itay-grudev requested a review from mnencia as a code owner June 20, 2026 12:43
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 20, 2026
Signed-off-by: Itay Grudev <itay@verito.digital>
tuunit and others added 10 commits July 3, 2026 10:44
Signed-off-by: Nolan Gilley <nkgilley@gmail.com>
Signed-off-by: Jan Larwig <jan@larwig.com>
Signed-off-by: Itay Grudev <itay+github.com@grudev.com>
Co-authored-by: Nolan Gilley <nkgilley@gmail.com>
Co-authored-by: Itay Grudev <itay+github.com@grudev.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
…uster

Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
…only

Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
…ions

Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
@itay-grudev itay-grudev force-pushed the feat/barman-plugin-support branch from 20e887c to 0ac2b24 Compare July 3, 2026 07:45
itay-grudev and others added 5 commits July 3, 2026 11:09
The barman-plugin-migration chainsaw test fails consistently in CI. The
migration itself works correctly (verified against operator source and the
plugin migration docs); the failures are in test assertions of transient
states, plus one secret-name typo.

- Migration 'Upgrading cluster' phase (step 4): status.phase is set for only
  a fraction of a second (the operator models rollouts as PhaseUpgrade ->
  PhaseWaitingForInstancesToBeActive, see tests/e2e/probes_test.go), and
  helm --wait does not gate CNPG CRDs, so polling always missed it. Replaced
  with a polling assert on the persistent UpgradingInstance Event.

- Backup 'running' phase (step 5): the backup completes in ~10s, faster than
  polling. Replaced with a polling assert on the persistent backup 'Starting'
  Event (backup_controller.go:337).

- PITR secret name (step 8): referenced recovery-backup-pitr-superuser
  (release name) instead of recovery-backup-pitr-cluster-superuser (cluster
  name), causing CreateContainerConfigError. Fixed.

Verified end-to-end in isolated fork CI (identical test( cluster )
workflow), including PITR recovery.

Signed-off-by: Abdullah Alaqel <abdullah.t.aqeel@gmail.com>
Signed-off-by: Abdullah Alaqeel <abdullah.t.aqeel@gmail.com>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
Signed-off-by: Itay Grudev <itay@verito.digital>
The barman-plugin-scheduledbackups test intermittently fails with
'context deadline exceeded' during cleanup. The chart forces immediate:
true on scheduled backups (templates/scheduled-backups.yaml), so a backup
is still running when cleanup starts; Barman blocks instance shutdown
until it completes, pushing teardown past the 5m cleanup budget on GitHub
runners.

Expose cluster.stopDelay in the chart (values + schema + template), mapping
to the CNPG Cluster spec.stopDelay, which also sets the pod's
terminationGracePeriodSeconds. The scheduledbackups test sets stopDelay: 30
so the instance is force-stopped promptly at teardown, interrupting the
still-running backup. That's acceptable because this test only verifies a
backup is started from the ScheduledBackup; backup success is covered by
barman-plugin-backup-restore.

Result: passes reliably and runs in ~75s (down from ~6m, previously timing
out). Verified green in fork CI. This is the 'help it clean up faster'
approach rather than raising the cleanup timeout.

Supersedes #940. Supplements #924.

Signed-off-by: Abdullah Alaqeel <abdullah.t.aqeel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chart( cluster ) Related to the cluster chart size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

when will the cluster helm chart support the barman-cloud-plugin cnpgi?

3 participants