馃悰 Fix: migrating existing clusters to the Barman Cloud Plugin
v0.1.0 set spec.backup = null in plugin mode. For an existing Cluster, kubernetes_manifest sends that as an explicit null, which the CNPG CRD rejects (spec.backup in body must be of type object: "null"). Switching a live cluster to method = "plugin", the migration path, therefore failed. New clusters were unaffected.
The Cluster spec is now built from fragments, so optional sections are omitted, never null:
| Mode | spec.backup |
spec.plugins |
|---|---|---|
| backups disabled | omitted | omitted |
barmanObjectStore (default) |
full in-tree block (unchanged) | omitted |
plugin |
{ target } only |
Barman Cloud Plugin as WAL archiver |
Server-side apply removes the previously managed barmanObjectStore and retentionPolicy when switching. The ScheduledBackup's pluginConfiguration is likewise omitted outside plugin mode. Disabling backups on a cluster that had them is now clean too.
Use v0.1.1 (not v0.1.0) to migrate existing clusters. A failed v0.1.0 apply leaves the cluster unchanged; only the (inert) ObjectStore is created, and v0.1.1 picks it up as-is.
What's Changed
- fix: omit spec.backup/plugins instead of setting them to null by @pascalinthecloud in #14
Full Changelog: v0.1.0...v0.1.1