mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-19 18:01:46 +02:00
merge with master and resolve conflicts
This commit is contained in:
@@ -1048,11 +1048,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
|
||||
@@ -1498,8 +1500,8 @@ func (c *Cluster) generateLogicalBackupJob() (*batchv1beta1.CronJob, error) {
|
||||
)
|
||||
|
||||
labels := map[string]string{
|
||||
"version": c.Name,
|
||||
"application": "spilo-logical-backup",
|
||||
c.OpConfig.ClusterNameLabel: c.Name,
|
||||
"application": "spilo-logical-backup",
|
||||
}
|
||||
podAffinityTerm := v1.PodAffinityTerm{
|
||||
LabelSelector: &metav1.LabelSelector{
|
||||
|
||||
Reference in New Issue
Block a user