Skip to content

feat(cluster): expose declarative logical replication (Publication/Subscription) - #973

Open
philippemnoel wants to merge 1 commit into
cloudnative-pg:mainfrom
philippemnoel:phil/declarative-logical-replication
Open

feat(cluster): expose declarative logical replication (Publication/Subscription)#973
philippemnoel wants to merge 1 commit into
cloudnative-pg:mainfrom
philippemnoel:phil/declarative-logical-replication

Conversation

@philippemnoel

@philippemnoel philippemnoel commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

What

  • Exposes CloudNativePG's declarative logical replication on the cluster chart via publications and subscriptions, rendered as Publication / Subscription resources.
  • Adds a top-level externalClusters passthrough, injected into the Cluster spec in any mode, so a standalone cluster can name the publisher a subscription points at.
  • Documents all three in values.yaml, values.schema.json and the README, with publisher/subscriber examples.

Why

The chart surfaces CNPG's one-shot recovery.import, but not continuous logical replication — the mechanism behind a near-zero-downtime migration. cluster.externalClusters previously emitted entries only for the recovery/replica bootstraps, so a standalone subscriber had no way to reference its publisher.

Backwards compatibility

All three values default to []. The new templates then render nothing, and externalClusters: is emitted under exactly the same conditions as before.

Tests

  • helm lint charts/cluster, and helm template over every examples/ and test/ values file diffed against main: byte-identical Cluster manifests.
  • New logical-replication chainsaw test: a publisher cluster declaratively publishes a table, a subscriber consumes it through a user-defined externalClusters entry, and the row is asserted to replicate.

@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. chart( cluster ) Related to the cluster chart labels Jul 26, 2026
…bscription)

Adds `publications` and `subscriptions` values that render CNPG
`Publication` and `Subscription` resources, plus a top-level
`externalClusters` passthrough so a standalone cluster can reach the
external publisher a subscription points at.

Claude-Session: https://claude.ai/code/session_01PkQZAEh2YptQhk9ENfmKy8
Signed-off-by: Philippe Noël <philippemnoel@gmail.com>
@philippemnoel
philippemnoel force-pushed the phil/declarative-logical-replication branch from 96451ba to 8694c97 Compare July 26, 2026 15:00
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:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant