Skip to content

Commit

Permalink
K8SPXC-1538 fix loadBalancerSourceRanges for replicas (#1933)
Browse files Browse the repository at this point in the history
* K8SPXC-1538 fix loadBalancerSourceRanges for replicas

* fix
  • Loading branch information
nmarukovich authored Jan 16, 2025
1 parent 879e522 commit 41977b1
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 @@ -432,7 +432,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.Type == corev1.ServiceTypeLoadBalancer {
loadBalancerSourceRanges = cr.Spec.HAProxy.ExposePrimary.LoadBalancerSourceRanges
}
loadBalancerIP = cr.Spec.HAProxy.ExposeReplicas.ServiceExpose.LoadBalancerIP
Expand Down

0 comments on commit 41977b1

Please sign in to comment.