Skip to content

feat(cluster): add spec.postgresql.synchronous.failoverQuorum field - #8589

Merged
gbartolini merged 7 commits into
cloudnative-pg:mainfrom
leonardoce:dev/promote-failover-quorum
Sep 26, 2025
Merged

gbartolini merged 7 commits into
cloudnative-pg:mainfrom
leonardoce:dev/promote-failover-quorum

Conversation

@leonardoce

@leonardoce leonardoce commented Sep 17, 2025 •

Copy link
Copy Markdown
Contributor

Introduce a native configuration field, spec.postgresql.synchronous.failoverQuorum, allowing users to enable or disable the failover quorum feature directly in the Cluster spec.

Existing clusters using the alpha.cnpg.io/failoverQuorum annotation are unaffected: the mutating webhook automatically sets the new field to honour the annotation.

The annotation takes precedence if both the annotation and the field are set.

Deprecation notice: the alpha.cnpg.io/failoverQuorum annotation is deprecated. Users are encouraged to migrate to the native .spec.postgresql.synchronous.failoverQuorum option and remove the annotation from their manifests. The annotation will be removed in a future release.

Closes #8170

@leonardoce
leonardoce requested a review from a team September 17, 2025 14:48
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 17, 2025
@cnpg-bot cnpg-bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.25 labels Sep 17, 2025
@leonardoce leonardoce changed the title feat: add spec.postgresql.synchronous.failoverQuorum field to Clust… feat: add spec.postgresql.synchronous.failoverQuorum field to Cluster Sep 17, 2025
@github-actions

Copy link
Copy Markdown
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

@leonardoce
leonardoce force-pushed the dev/promote-failover-quorum branch from a234138 to 91dd116 Compare September 17, 2025 14:49
@dosubot dosubot Bot added the enhancement 🪄 New feature or request label Sep 17, 2025
@leonardoce

Copy link
Copy Markdown
Contributor Author

/test

@github-actions

Copy link
Copy Markdown
Contributor

@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Sep 17, 2025
@leonardoce
leonardoce force-pushed the dev/promote-failover-quorum branch from 91dd116 to 54b6cf8 Compare September 18, 2025 09:03
@leonardoce

Copy link
Copy Markdown
Contributor Author

This PR is not adding E2e tests for the failover quorum feature, those will come in a subsequent PR.
I believe the chaos testing project will help with this feature, too.

@armru
armru force-pushed the dev/promote-failover-quorum branch from 54b6cf8 to a7e0d90 Compare September 22, 2025 14:16
@armru

armru commented Sep 23, 2025

Copy link
Copy Markdown
Member

/test limit=local

@github-actions

Copy link
Copy Markdown
Contributor

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Sep 23, 2025
@gbartolini gbartolini changed the title feat: add spec.postgresql.synchronous.failoverQuorum field to Cluster feat(cluster): add spec.postgresql.synchronous.failoverQuorum field Sep 25, 2025
@gbartolini
gbartolini force-pushed the dev/promote-failover-quorum branch from 15bb7e2 to ba76f16 Compare September 25, 2025 10:14
@gbartolini

Copy link
Copy Markdown
Contributor

/test

@github-actions

Copy link
Copy Markdown
Contributor

@gbartolini gbartolini added do not backport This PR must not be backported - it will be in the next minor release and removed backport-requested ◀️ This pull request should be backported to all supported releases release-1.25 labels Sep 25, 2025
@gbartolini
gbartolini force-pushed the dev/promote-failover-quorum branch from ba76f16 to ceb58d8 Compare September 25, 2025 13:00
@gbartolini

Copy link
Copy Markdown
Contributor

/test

@github-actions

Copy link
Copy Markdown
Contributor

leonardoce and others added 6 commits September 25, 2025 23:23
…er CRD

This patch introduces a native configuration field,
`spec.postgresql.synchronous.failoverQuorum`, which allows users to enable or
disable the failover quorum feature directly in the Cluster spec.

Behavior for existing clusters using the
`alpha.cnpg.io/failoverQuorum` annotation remains unchanged: the mutating
webhook will automatically set the new field to honor the annotation.

If both the annotation and the field are set, the annotation takes precedence.

See: cloudnative-pg#8170

Signed-off-by: Leonardo Cecchi <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
@leonardoce
leonardoce force-pushed the dev/promote-failover-quorum branch from bb047ff to 097ea40 Compare September 25, 2025 21:23
@leonardoce

Copy link
Copy Markdown
Contributor Author

/test

@github-actions

Copy link
Copy Markdown
Contributor

Signed-off-by: Gabriele Bartolini <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not backport This PR must not be backported - it will be in the next minor release enhancement 🪄 New feature or request lgtm This PR has been approved by a maintainer ok to merge 👌 This PR can be merged size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: promote failover quorum to stable

4 participants