Skip to content

Commit

Permalink
K8SPXC-1538 fix loadBalancerSourceRanges for replicas
Browse files Browse the repository at this point in the history
  • Loading branch information
nmarukovich committed Jan 7, 2025
1 parent 191f386 commit c79b6ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/apis/pxc/v1/pxc_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ type HAProxySpec struct {

// Deprecated: Use ExposeReplica.Enabled instead
ReplicasServiceEnabled *bool `json:"replicasServiceEnabled,omitempty"`
// Deprecated: Use ExposeReplica.LoadBalancerSourceRanges instead
// Deprecated: Use ExposeReplicas.LoadBalancerSourceRanges instead
ReplicasLoadBalancerSourceRanges []string `json:"replicasLoadBalancerSourceRanges,omitempty"`
// Deprecated: Use ExposeReplica.LoadBalancerIP instead
ReplicasLoadBalancerIP string `json:"replicasLoadBalancerIP,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/pxc/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ func NewServiceHAProxyReplicas(cr *api.PerconaXtraDBCluster) *corev1.Service {
if cr.CompareVersionWith("1.14.0") >= 0 {
if cr.Spec.HAProxy.ExposeReplicas.ServiceExpose.LoadBalancerSourceRanges != nil {
loadBalancerSourceRanges = cr.Spec.HAProxy.ExposeReplicas.ServiceExpose.LoadBalancerSourceRanges
} else {
} else if cr.Spec.HAProxy.ExposeReplicas.ServiceExpose.LoadBalancerSourceRanges == nil && cr.Spec.HAProxy.ExposeReplicas.Enabled && cr.Spec.HAProxy.ExposeReplicas.Type == corev1.ServiceTypeLoadBalancer {
loadBalancerSourceRanges = cr.Spec.HAProxy.ExposePrimary.LoadBalancerSourceRanges
}
loadBalancerIP = cr.Spec.HAProxy.ExposeReplicas.ServiceExpose.LoadBalancerIP
Expand Down

0 comments on commit c79b6ad

Please sign in to comment.