diff --git a/pkg/cluster/k8sres.go b/pkg/cluster/k8sres.go index 785e242c4..8c136cce6 100644 --- a/pkg/cluster/k8sres.go +++ b/pkg/cluster/k8sres.go @@ -703,7 +703,7 @@ func (c *Cluster) generateService(role PostgresRole, spec *spec.PostgresSpec) *v var annotations map[string]string - if c.shouldCreateLoadBalancerForService(role, spec) == true { + if c.shouldCreateLoadBalancerForService(role, spec) { // safe default value: lock load balancer to only local address unless overridden explicitly. sourceRanges := []string{localHost} diff --git a/pkg/spec/postgresql.go b/pkg/spec/postgresql.go index 501a77724..460e62237 100644 --- a/pkg/spec/postgresql.go +++ b/pkg/spec/postgresql.go @@ -99,7 +99,7 @@ type PostgresSpec struct { // EnableLoadBalancer is a pointer, since it is important to know if that parameters is omitted from the Postgres manifest // in that case UseLoadBalancer == nil and the value is taken from the operator config UseLoadBalancer *bool `json:"useLoadBalancer,omitempty"` - // if ReplicaLoadBalancer == nil (is unset), value of UseLoadBalancer takes priority + // if ReplicaLoadBalancer == nil (is unset), value of UseLoadBalancer determines if a balancer for replicas is created ReplicaLoadBalancer *bool `json:"replicaLoadBalancer,omitempty"` NumberOfInstances int32 `json:"numberOfInstances"` Users map[string]UserFlags `json:"users"`