feat(cluster): extend backup configuration for volumesnapshot and plugin
Summary of Changes
New Backup Options
This pull request introduces two new backup options to the chart: volumeSnapshot and plugin. These options provide additional flexibility for configuring backups in the CloudNativePG operator.
Volume Snapshots
- Added support for volume snapshots as a backup method.
- Configurable parameters include:
classNamewalClassNametablespaceClassNamesnapshotOwnerReferenceonlineonlineConfiguration(withwaitForArchiveandimmediateCheckpoint)
Plugin Backups
- Added support for plugin-based backups.
- Configurable parameters include:
nameparameters
Documentation Updates
- Updated the README.md and README.md.gotmpl files to include documentation for the new backup options.
- Provided examples for configuring volume snapshots and plugin backups.
Extended Tests
- Added new test cases to validate the functionality of the new backup options.
- Extended the existing test suite to cover scenarios involving volume snapshots and plugin backups.
@itay-grudev please rerun chainsaw tests as the failed one seems to be failed because of an image pull error
@itay-grudev anything else I can do here?
No. Thanks a lot. I'll review it when I can. I apologize in advance if I delay you, I am just under a lot of pressure right now.
@itay-grudev pull request already got merge conflicts. do you resolve them on merge or do you require me to do this?
@itay-grudev solved the conflicts by rebasing main
Is this updated to support 1.26? I couldn't immediately spot how this chart would setup the plugins key, with or without this.
In any case this or something similar should be prioritized, given 1.26 deprecates the inbuilt barman backup support in favor of an official plugin.
Is this updated to support 1.26? I couldn't immediately spot how this chart would setup the
pluginskey, with or without this.
It is not explicitly updated to 1.26 but it supports the plugin syntax of 1.25 (see example). Have not checked if this syntax has changed yet.
In any case this or something similar should be prioritized, given 1.26 deprecates the inbuilt barman backup support in favor of an official plugin.
The PR hasn't got any attention for months now, so I will not put any work into this until there is some chance to get merged.
@m4s-b3n thanks, that's understandable of course. My comment was of course mainly directed at the maintainers.
Anyways, to my understanding of https://cloudnative-pg.io/plugin-barman-cloud/docs/usage/#configuring-wal-archiving and looking at https://cloudnative-pg.io/documentation/1.26/cloudnative-pg.v1/#postgresql-cnpg-io-v1-BackupConfiguration I'm not sure defining backup.pluginConfiguration is longer recommended or supported.
I'm currently having success with patching the chart via a postrender hook invoking kustomize and the following patch:
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: ${name}-cluster
namespace: ${namespace}
spec:
plugins:
- name: barman-cloud.cloudnative-pg.io
isWALArchiver: true
parameters:
barmanObjectName: ${name}
and also patching in an ObjectStore, a secret for the credentials and ScheduledBackup of course.