mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-02 19:21:12 +02:00
Enable backward compatibility for enable_load_balancer setting from operator configmap
This commit is contained in:
@@ -696,8 +696,11 @@ func (c *Cluster) shouldCreateLoadBalancerForService(role PostgresRole, spec *sp
|
||||
return *spec.UseLoadBalancer
|
||||
}
|
||||
|
||||
if spec.EnableMasterLoadBalancer != nil {
|
||||
return *spec.EnableMasterLoadBalancer
|
||||
// `enable_load_balancer`` governs LB for a master service
|
||||
// there is no equivalent operator configmap option for the replica LB
|
||||
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)
|
||||
return *c.OpConfig.EnableLoadBalancer
|
||||
}
|
||||
|
||||
return c.OpConfig.EnableMasterLoadBalancer
|
||||
|
||||
Reference in New Issue
Block a user