mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 15:57:55 +02:00
fix when syncing standby discription (#2513)
This commit is contained in:
@@ -981,7 +981,7 @@ func (c *Cluster) Update(oldSpec, newSpec *acidv1.Postgresql) error {
|
||||
}()
|
||||
|
||||
// add or remove standby_cluster section from Patroni config depending on changes in standby section
|
||||
if reflect.DeepEqual(oldSpec.Spec.StandbyCluster, newSpec.Spec.StandbyCluster) {
|
||||
if !reflect.DeepEqual(oldSpec.Spec.StandbyCluster, newSpec.Spec.StandbyCluster) {
|
||||
if err := c.syncStandbyClusterConfiguration(); err != nil {
|
||||
return fmt.Errorf("could not set StandbyCluster configuration options: %v", err)
|
||||
}
|
||||
|
||||
+1
-1
@@ -85,7 +85,7 @@ func (c *Cluster) Sync(newSpec *acidv1.Postgresql) error {
|
||||
}
|
||||
|
||||
// add or remove standby_cluster section from Patroni config depending on changes in standby section
|
||||
if reflect.DeepEqual(oldSpec.Spec.StandbyCluster, newSpec.Spec.StandbyCluster) {
|
||||
if !reflect.DeepEqual(oldSpec.Spec.StandbyCluster, newSpec.Spec.StandbyCluster) {
|
||||
if err := c.syncStandbyClusterConfiguration(); err != nil {
|
||||
return fmt.Errorf("could not sync StandbyCluster configuration: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user