diff --git a/manifests/complete-postgres-manifest.yaml b/manifests/complete-postgres-manifest.yaml index 5663dcbc2..b8f8d4906 100644 --- a/manifests/complete-postgres-manifest.yaml +++ b/manifests/complete-postgres-manifest.yaml @@ -12,7 +12,7 @@ spec: zalando: - superuser - createdb - enableMasterLoadBalancer: true + # enableMasterLoadBalancer: true # enableReplicaLoadBalancer: true allowedSourceRanges: # load balancers' source ranges for both master and replica services - 127.0.0.1/32 diff --git a/pkg/spec/postgresql.go b/pkg/spec/postgresql.go index 1b47ca162..7dac7992b 100644 --- a/pkg/spec/postgresql.go +++ b/pkg/spec/postgresql.go @@ -93,9 +93,8 @@ type PostgresSpec struct { Patroni `json:"patroni,omitempty"` Resources `json:"resources,omitempty"` - TeamID string `json:"teamId"` - AllowedSourceRanges []string `json:"allowedSourceRanges"` - DockerImage string `json:"dockerImage,omitempty"` + TeamID string `json:"teamId"` + DockerImage string `json:"dockerImage,omitempty"` // vars that enable load balancers are pointers because it is important to know if any of them is omitted from the Postgres manifest // in that case the var evaluates to nil and the value is taken from the operator config @@ -103,10 +102,13 @@ type PostgresSpec struct { EnableReplicaLoadBalancer *bool `json:"enableReplicaLoadBalancer,omitempty"` // deprecated load balancer settings mantained for backward compatibility - // see "Load balancers" operator docs (PR #258) + // see "Load balancers" operator docs UseLoadBalancer *bool `json:"useLoadBalancer,omitempty"` ReplicaLoadBalancer *bool `json:"replicaLoadBalancer,omitempty"` + // load balancers' source ranges are the same for master and replica services + AllowedSourceRanges []string `json:"allowedSourceRanges"` + NumberOfInstances int32 `json:"numberOfInstances"` Users map[string]UserFlags `json:"users"` MaintenanceWindows []MaintenanceWindow `json:"maintenanceWindows,omitempty"`