Skip to content

Commit 9bb5d8a

Browse files
authored
Fix updating SynchronousNodeCount (#2552) (#2558)
CRD support for synchronous_node_count was previously added in #1484, however the desired SynchronousNodeCount was not compared to the actual patroni configuration, which meant it was never updated.
1 parent 06947ee commit 9bb5d8a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/cluster/sync.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,9 @@ func (c *Cluster) checkAndSetGlobalPostgreSQLConfiguration(pod *v1.Pod, effectiv
643643
if desiredPatroniConfig.SynchronousModeStrict != effectivePatroniConfig.SynchronousModeStrict {
644644
configToSet["synchronous_mode_strict"] = desiredPatroniConfig.SynchronousModeStrict
645645
}
646+
if desiredPatroniConfig.SynchronousNodeCount != effectivePatroniConfig.SynchronousNodeCount {
647+
configToSet["synchronous_node_count"] = desiredPatroniConfig.SynchronousNodeCount
648+
}
646649
if desiredPatroniConfig.TTL > 0 && desiredPatroniConfig.TTL != effectivePatroniConfig.TTL {
647650
configToSet["ttl"] = desiredPatroniConfig.TTL
648651
}

0 commit comments

Comments
 (0)