mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-18 04:50:03 +02:00
Standby cluster promotion by changing manifest (#2472)
* Standby cluster promotion by changing manifest * Updated the documentation --------- Co-authored-by: Senthilnathan M <snathanm@vmware.com>
This commit is contained in:
co-authored by
Senthilnathan M
parent
bbba15f9bf
commit
dad5b132ec
@@ -880,6 +880,13 @@ 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 err := c.syncStandbyClusterConfiguration(); err != nil {
|
||||
return fmt.Errorf("could not set StandbyCluster configuration options: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// pod disruption budget
|
||||
if oldSpec.Spec.NumberOfInstances != newSpec.Spec.NumberOfInstances {
|
||||
c.logger.Debug("syncing pod disruption budgets")
|
||||
|
||||
Reference in New Issue
Block a user