Skip to content

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

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

feat(cluster): add spec.postgresql.synchronous.failoverQuorum field#8589
gbartolini merged 7 commits intocloudnative-pg:mainfrom
leonardoce:dev/promote-failover-quorum

Conversation

@leonardoce
Copy link
Contributor

@leonardoce leonardoce commented Sep 17, 2025

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 review from a team and jsilvela as code owners 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 release-1.26 release-1.27 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
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
Contributor Author

/test

@github-actions
Copy link
Contributor

@leonardoce, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/17802097945

@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
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
Copy link
Member

armru commented Sep 23, 2025

/test limit=local

@github-actions
Copy link
Contributor

@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/17950294461

@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
Contributor

/test

@github-actions
Copy link
Contributor

@gbartolini, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/18004267495

@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 release-1.26 release-1.27 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
Contributor

/test

@github-actions
Copy link
Contributor

@gbartolini, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/18010989409

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 <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
@leonardoce leonardoce force-pushed the dev/promote-failover-quorum branch from bb047ff to 097ea40 Compare September 25, 2025 21:23
@leonardoce
Copy link
Contributor Author

/test

@github-actions
Copy link
Contributor

@leonardoce, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/18021184584

Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
@gbartolini gbartolini merged commit f743421 into cloudnative-pg:main Sep 26, 2025
30 checks passed
rossigee pushed a commit to rossigee/cloudnative-pg that referenced this pull request Oct 2, 2025
…cloudnative-pg#8589)

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 cloudnative-pg#8170

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
@dosubot dosubot bot mentioned this pull request Oct 10, 2025
4 tasks
THE-BRAHMA pushed a commit to THE-BRAHMA/cloudnative-pg that referenced this pull request Oct 30, 2025
…cloudnative-pg#8589)

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 cloudnative-pg#8170

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: theBrahma <office.utpal.brahma@gmail.com>
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