Provide static IP-address for LoadBalancer

Description

We allow users to expose database clusters and its components through various Service Types, including load balancers.

There is a use case, where user wants to have a static IP-address for the load balancer. This also includes internal load balancers in the clouds.

 

This can be done through `loadBalancerIP` field.

spec:   loadBalancerIP: 1.2.3.4   type: LoadBalancer
  • We are going to pass through loadBalancerIP parameter to the service spec.

  • If exposeType is not LoadBalancer, we still pass through loadBalancerIP parameter to the spec

  • We rely on Kubernetes logic to parse and make a decision about loadBalancerIP valid inputs

    • We return the error if service creation fails

  • We are not adding loadBalancerIP to PXC exposure, as PXC is exposed as a service per Pod fashion (so IP cannot be the same for all nodes).

  • We are going to introduce loadBalancerIP into the custom resource in the following places:

spec: pxc: expose: type: LoadBalancer proxysql: loadBalancerIP: 1.2.3.4 haproxy: loadBalancerIP: 1.2.3.4

Environment

None

Smart Checklist

Activity

Slava Sarzhan October 28, 2022 at 7:36 AM

Done

Details

Assignee

Reporter

Labels

Needs QA

Yes

Needs Doc

Yes

Fix versions

Priority

Smart Checklist

Created March 2, 2022 at 9:22 AM
Updated March 5, 2024 at 5:40 PM
Resolved December 7, 2022 at 10:34 AM

Flag notifications