feat(cluster): add CNPG-I plugin support with ObjectStore CRD#838
feat(cluster): add CNPG-I plugin support with ObjectStore CRD#838bernardgut wants to merge 1 commit intocloudnative-pg:mainfrom
Conversation
58c0a79 to
9d7202c
Compare
|
Ok I think this is ready for review.: Tested the full plugin-based backup flow end-to-end on a local KIND cluster (k8s v1.35.0): Stack deployed:
Test steps:
Template-level validation:
|
|
Thx for the rework :) i'm going to close my pr sine it is outdated anyway. |
|
Thanks for this work, extremely appreciated :).
|
9d7202c to
5289051
Compare
|
Thanks for the thorough review @leoarry! I've addressed your feedback points in the latest force-push: 1. backups:
instanceSidecarConfiguration:
env:
- name: AWS_REQUEST_CHECKSUM_CALCULATION
value: when_required
- name: AWS_RESPONSE_CHECKSUM_VALIDATION
value: when_required2. Annotations on ObjectStore CR — ✅ Done. The ObjectStore CR now inherits 3. Recovery from separate S3 sources — The current PR supports plugin-based recovery via For the use case of specifying independent ObjectStore configurations for recovery and replica (different buckets, credentials, etc.), this would require generating multiple ObjectStore CRDs and expanding the values API. I think that's best handled as a follow-up PR to keep this one focused. I'll open a tracking issue for it. In the meantime, the legacy Re-tested E2E on k8s with CNPG v1.28.1, barman-cloud plugin v0.11.0, cert-manager v1.17.2, MinIO:
|
5289051 to
28648cf
Compare
Signed-off-by: Bernard Gütermann <bernard.gutermann@sekops.ch>
28648cf to
5ea03bb
Compare
|
Follow-up push — API quality improvements: 1. DRY plugin name helper — Extracted the hardcoded string 2. Documented 3. Regenerated README — Updated All changes verified via |
|
@bernardgut you're an absolute legend! |
|
Hello maintainers! I'm building my cluster with the new Barman Cloud plugin, and I would like to know how much time approx. would this code be released. How does this project triggers releases? Do you have an idea of a potential release date, and if this would include this PR? Also, I take the opportunity to ask a question: Thank you for your time! |

Description
Add support for CNPG-I plugins in the cluster chart. This is a reworked version of #680 that addresses all reviewer feedback.
Changes
cluster.pluginspassthrough to Cluster spec with auto-injection ofbarmanObjectNameObjectStoreCRD generation whenbarman-cloud.cloudnative-pg.ioplugin is enabledScheduledBackupwithpluginConfiguration, automatically usesmethod: pluginunlessvolumeSnapshotis explicitly setobject_storeusing the plugin external cluster sourcebarmanObjectStoreonly rendered when plugin is absent (no regression for existing users)Reviewer feedback addressed from #680
enabledrequired but CRD defaults totrueenabledastruewhen omittedbarmanObjectNamecouplingpluginvolumeSnapshotindent/nindentin recovery templateTesting
Template validation
helm templatewith default values produces identical output to stock chart (zero regression)ObjectStore+Clusterwith plugins + pluginScheduledBackupvolumeSnapshotmethod preserved when explicitly setpostgresql-cluster-configurationE2E on KIND (k8s v1.35.0)
Full stack: CNPG operator v1.28.1, cert-manager v1.17.2, MinIO operator + tenant, barman-cloud plugin v0.11.0.
ObjectStoreCRD created and accepted by the API serverClusterwithpluginssection applied — operator registers the plugin2/2 Running, imageplugin-barman-cloud-sidecar:v0.11.0)Backupcompleted successfully (method: plugin)Files changed (11)
_helpers.tpluseBarmanCloudPluginandbarmanCloudObjectStoreNamehelperscluster.yamlbarmanObjectNameobjectStore.yaml_backup.tpl_external_clusters.tplscheduled-backups.yamlvalues.yamlplugins: []with docsvalues.schema.jsonREADME.mdtest/*Closes #634
Ref: #680