Allow external API VIP providers - #537
Conversation
|
I'd say it would be good perhaps to also include a "none" mode that doesn't even configure the IP for the apiVIP on the RKE2/k3s config files. |
davidcassany
left a comment
There was a problem hiding this comment.
Looks good to me, just a couple of nit comments regarding the apiVIPMode values.
| * `apiVIP6` - Required for multi-node clusters if not using `apiVIP`; Specifies the IPv6 address which will serve as the cluster LoadBalancer, backed by MetalLB. | ||
| * `apiVIP` - Required for multi-node clusters if not using `apiVIP6`; Specifies the IPv4 address which will serve as the cluster LoadBalancer. By default, setting this field adds MetalLB and endpoint-copier-operator to the image build. | ||
| * `apiVIP6` - Required for multi-node clusters if not using `apiVIP`; Specifies the IPv6 address which will serve as the cluster LoadBalancer. By default, setting this field adds MetalLB and endpoint-copier-operator to the image build. | ||
| * `apiVIPMode` - Optional; Selects how the API VIP is provided. Omitted or `managed` keeps the default built-in MetalLB and endpoint-copier-operator install. `external` keeps `apiVIP` or `apiVIP6` configured but disables adding those built-in Helm charts at image build time. |
There was a problem hiding this comment.
I am wondering if instead of managed shouldn't we name it metallb. If in the future we add support for additional or different load balancers probably it will make more sense to name the stack.
There was a problem hiding this comment.
The specific value would read better if we had:
loadBalancer:metallb | external
I guess both the above and apiVIPMode: managed | external are fine.
| } | ||
|
|
||
| if k.Network.APIVIP4 != "" || k.Network.APIVIP6 != "" { | ||
| if k.Network.IsHA() && k.Network.APIVIPMode != "external" { |
There was a problem hiding this comment.
On the same idea I'd probably make an explicit match against the network mode rather than filter out the external.
Description:
What this PR does
Adds an optional
apiVIPModesetting to the Kubernetes network configuration.managedor omitted preserves the existing behavior, adding MetalLB and endpoint-copier-operator.
externalkeeps the configured API VIP but skips the built-in load-balancer Helmcharts.
Why
This allows clusters to use an externally managed load balancer without including the
built-in load-balancing components.
Testing
elemental3andelemental3ctlbuilt successfully in an AMD64 Go 1.26container.