Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use the correct external port for control plane LBs (#475)
Per the CPEM docs, we expect that the LoadBalancer service created by CPEM for the control plane should, by default, have a `port` that matches the port on which `kube-apiserver` is listening, and if the user provided a non-zero value for `apiServerPort`, the LoadBalancer service will use that port. However, the CPEM reconcilers for both EMLB- and EIP-based control plane load balancing did not actually write the correct `port` values into the Load Balancer service object. This updates the EMLB reconciler so that: - By default, the `targetPort` for `default/kubernetes` is written to the `port` for the control plane load balancer service; this is done because the `port` for `default/kubernetes` is `443` - If `apiServerPort` is non-zero, that value is written into the `port` for the control plane load balancer service. The EIP reconciler is untouched to avoid unnecessary changes; that LB implementation does not appear to be impacted by this issue in practice.
- Loading branch information