forked from cloudnative-pg/cloudnative-pg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
.spec.replicaCluster.primary
field (cloudnative-pg#4388)
This patch introduces changes to the handling of the `.spec.replica.enabled` field, allowing it to be set to `nil`. Prior to this patch, only `true` and `false` were permitted, with `false` being the default. When the `.spec.replica.enabled` field is set to `nil`, the cluster's classification as a primary or replica cluster will be determined by two new fields, `.spec.replica.primary` and `.spec.replica.self`. The `.spec.replica.self` field specifies the name of the current cluster, which will be compared with the `.spec.externalClusters[].name` field. The `.spec.replica.primary` field specifies the name of the current primary cluster, which will be searched in the same list. Under the new behavior, when the `.spec.replica.enabled` field is set to `nil` and the `.spec.replica.primary` and `.spec.replica.self` fields contain the same value, the cluster is classified as a primary cluster. Conversely, when the `.spec.replica.enabled` field is `nil` and the values of `.spec.replica.primary` and `.spec.replica.self` differ, the cluster will be classified as a replica cluster. The purpose of this patch is to streamline the configuration process for a distributed PostgreSQL topology, where the `.spec.externalClusters` section is synchronized across different data centers. Closes cloudnative-pg#3942 Signed-off-by: Armando Ruocco <[email protected]> Signed-off-by: Leonardo Cecchi <[email protected]> Signed-off-by: Francesco Canovai <[email protected]> Co-authored-by: Leonardo Cecchi <[email protected]> Co-authored-by: Francesco Canovai <[email protected]>
- Loading branch information
1 parent
a68a520
commit ae9a127
Showing
17 changed files
with
548 additions
and
113 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.