Minor updates

- Remove extra warning message while creating standby
- Limit the number of pods to 1 for standby cluster
This commit is contained in:
Rafia Sabih
2019-06-14 16:01:23 +02:00
parent 14570dbc02
commit 9af13ed0df
3 changed files with 8 additions and 5 deletions
+6 -4
View File
@@ -977,6 +977,11 @@ 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.Infof("Standby cluster can have maximum of 1 pod")
max = 1
}
if max >= 0 && newcur > max {
newcur = max
}
@@ -1285,12 +1290,9 @@ func (c *Cluster) generateStandbyEnvironment(description *acidv1.StandbyDescript
return nil
}
// standby with S3, find out the bucket to setup standby
msg := "Standby from S3 bucket"
msg := "Standby from S3 bucket using custom parsed S3WalPath %s from the manifest"
c.logger.Info(msg, description.S3WalPath)
msg = "Use custom parsed S3WalPath %s from the manifest"
c.logger.Warningf(msg, description.S3WalPath)
result = append(result, v1.EnvVar{
Name: "STANDBY_WALE_S3_PREFIX",
Value: description.S3WalPath,