Repository navigation
feat(chart): CNPG zone affinity, synchronous API and barman-cloud plugin backup (v0.7.27) - #473
Merged
Merged
Conversation
…gin backup - postgresql.cnpg.affinity, topologySpreadConstraints, primaryUpdateMethod and synchronous are passed through to the CNPG Cluster. - barmanCloudPlugin renders an ObjectStore, the spec.plugins entry and a ScheduledBackup (method: plugin); SSE-KMS via kmsKeyId. No ScheduledBackup while archiving=false. - Chart-side checks mirror the CNPG webhook (legacy vs. new sync API, synchronous.number, plugin vs. built-in backup) plus destinationPath, credentials and kmsKeyId/encryption. - Built-in backup marked deprecated (removed in CloudNativePG 1.31). - Defaults render byte-identical to before. - PR CI lints and renders deploy/charts/weave (scripts/check_chart_cnpg.sh). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W9t7FeuDDnBkiM8kKa8MN9
- Plugin-plus-built-in-backup message no longer claims the webhook rejects the archiving=false stage. - Render test checks nesting of synchronous, affinity, primaryUpdateMethod and the plugins entry (enabled follows archiving) via PyYAML. - CHANGELOG states the synchronous.number rule as the webhook applies it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W9t7FeuDDnBkiM8kKa8MN9
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W9t7FeuDDnBkiM8kKa8MN9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the request "CNPG-Cluster im Weave-Chart – Hochverfügbarkeit über Zonen und Backup per Barman-Cloud-Plugin" for
deploy/charts/weave(postgresql.mode: cnpg):postgresql.cnpg.affinity,topologySpreadConstraints,primaryUpdateMethodandsynchronous(new CNPG API underspec.postgresql) are passed through. Empty values are not rendered.postgresql.cnpg.barmanCloudPluginrenders anObjectStore(barmancloud.cnpg.io/v1), thespec.pluginsentry (enabled=archiving,isWALArchiver: true) and aScheduledBackup(method: plugin). IfkmsKeyIdis set,--sse-kms-key-id=<id>is appended towal.archiveAdditionalCommandArgsanddata.additionalCommandArgs. When the block is off,barmancloud.cnpg.iodoes not appear anywhere.archiving: false(stage 1), noScheduledBackupis rendered._helpers.tpl, readablefail):synchronoustogether withminSyncReplicas/maxSyncReplicas> 0synchronous.number >= instances + len(standbyNamesPre/Post), the same rule as the CNPG 1.30 webhookbackupdestinationPathkmsKeyIdwithoutencryption: aws:kmsvalues.yamldocuments the deprecation of the built-in backup (removed in CNPG 1.31) and the zone guarantee only withtopology.kubernetes.io/zone+required. It also notes: no more instances than zones, StorageClass withWaitForFirstConsumer,synchronouspreferred over min/max, and a rolling restart whenarchivingchanges.scripts/check_chart_cnpg.sh(lint, rendering of the operator exampleexamples/cnpg-ha-barman-cloud.yamlin both stages with structure checks, 6 failure cases). It runs in the "Platform configuration" job ofpr-ci.yml. Before this change, no PR test rendereddeploy/charts/weave.archivingfalse→true or on anaffinitychange).Affected services
deploy/charts/weave,scripts/,.github/workflows/pr-ci.yml,services/ingest/CHANGELOG.md,README.mdTest plan
helm templaterendering is byte-identical to before for three cases: defaults, cnpg with minimal values, and cnpg withbackup.enabled: trueplusmin/maxSyncReplicas: 1. Compared locally against the base commit. Helm 3.16.2 was used here and in CI.scripts/check_chart_cnpg.shpasses. It covers lint, both stages of the example, plugin off, and the 6 failure cases. A mutation test (pluginenabledhard-coded tofalse) is detected.pytest -q scripts/tests: 70 passed, 9 skippedcluster_types.go,cluster_webhook.go) and plugin-barman-cloud v0.13.0 (objectstore_types.go)--sse-kms-key-id. The platform team uses the same pattern on the same EKS cluster.Checklist
contracts/updated if an API or event changed: n/apython scripts/weave_config.py checkpasses if configuration changed: n/a,weave.yamlunchangedvalues.yaml, CHANGELOG)deploy/.envin the diff (bucket, role and KMS key in the example are placeholders)Notes for reviewers
archiving: false, as the request requires. The CNPG webhook itself would accept that stage, and the error message says so.Clustercomes beforeObjectStore. With Argo CD, the order can be set viabarmanCloudPlugin.objectStoreAnnotations(sync wave).v0.7.27follows after the merge, on the merge commit, as with v0.7.26.Generated by Claude Code