Merge branch 'master' into feature/connection-pooler

This commit is contained in:
Dmitrii Dolgov
2020-03-06 13:40:15 +01:00
29 changed files with 469 additions and 266 deletions
+6 -4
View File
@@ -1110,11 +1110,13 @@ func (c *Cluster) getNumberOfInstances(spec *acidv1.PostgresSpec) int32 {
cur := spec.NumberOfInstances
newcur := cur
/* Limit the max number of pods to one, if this is standby-cluster */
if spec.StandbyCluster != nil {
c.logger.Info("Standby cluster can have maximum of 1 pod")
min = 1
max = 1
if newcur == 1 {
min = newcur
max = newcur
} else {
c.logger.Warningf("operator only supports standby clusters with 1 pod")
}
}
if max >= 0 && newcur > max {
newcur = max