mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-09 09:15:53 +02:00
Respond to code review
This commit is contained in:
@@ -697,7 +697,7 @@ func (c *Cluster) shouldCreateLoadBalancerForService(role PostgresRole, spec *sp
|
|||||||
}
|
}
|
||||||
|
|
||||||
// `enable_load_balancer`` governs LB for a master service
|
// `enable_load_balancer`` governs LB for a master service
|
||||||
// there is no equivalent operator configmap option for the replica LB
|
// there is no equivalent deprecated operator option for the replica LB
|
||||||
if c.OpConfig.EnableLoadBalancer != nil {
|
if c.OpConfig.EnableLoadBalancer != nil {
|
||||||
c.logger.Debugf("The operator configmap sets the deprecated `enable_load_balancer` param. Consider using the `enable_master_load_balancer` or `enable_replica_load_balancer` instead.", c.Name)
|
c.logger.Debugf("The operator configmap sets the deprecated `enable_load_balancer` param. Consider using the `enable_master_load_balancer` or `enable_replica_load_balancer` instead.", c.Name)
|
||||||
return *c.OpConfig.EnableLoadBalancer
|
return *c.OpConfig.EnableLoadBalancer
|
||||||
@@ -736,7 +736,6 @@ func (c *Cluster) generateService(role PostgresRole, spec *spec.PostgresSpec) *v
|
|||||||
// safe default value: lock load balancer to only local address unless overridden explicitly.
|
// safe default value: lock load balancer to only local address unless overridden explicitly.
|
||||||
sourceRanges := []string{localHost}
|
sourceRanges := []string{localHost}
|
||||||
|
|
||||||
// source ranges are the same for balancers for master and replica services
|
|
||||||
allowedSourceRanges := spec.AllowedSourceRanges
|
allowedSourceRanges := spec.AllowedSourceRanges
|
||||||
if len(allowedSourceRanges) >= 0 {
|
if len(allowedSourceRanges) >= 0 {
|
||||||
sourceRanges = allowedSourceRanges
|
sourceRanges = allowedSourceRanges
|
||||||
|
|||||||
Reference in New Issue
Block a user