-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable configuration of loadbalancer class #342
Conversation
This was easier than I was expecting, so there's a good chance I've missed something/many things. Would appreciate some guidance if so! I also have one open question inline regarding validation of names. I don't know if we want to do this at the operator level or not. Again, input welcome. |
I thought it would've been more complex too, because when I added it there was not the helm wrap yet. Glad to see we made things more maintainable.
We do! Otherwise I wouldn't have filed #267 |
.. and of course you'll have to please CI :P |
Ack. Turns out |
and you'll probably have to generate a few manifests. Just follow the errors. |
Looks good! I have a couple of asks:
|
Add the ability to set a 'loadBalancerClass' value on the 'MetalLB' CRD. The 'Service.Spec.LoadBalancerClass' field reached GA in Kubernetes 1.24 and support was introduced in MetalLB in v0.13 [1]. [1] metallb/metallb#1417 Signed-off-by: Stephen Finucane <[email protected]> Closes: #267
Follow the upstream docs [1]. The value of spec.loadBalancerClass must be a label-style identifier, with an optional prefix such as "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users. The k8s concept guide [2] indicates that a valid label value: - must be 63 characters or less (can be empty), - unless empty, must begin and end with an alphanumeric character ([a-z0-9A-Z]), - could contain dashes (-), underscores (_), dots (.), and alphanumerics between. We're not *fully* validating this since we don't limit the total characters to < 63 characters. I'm not sure how one can do this without positive lookup, which isn't supported by the stdlib re library. Good enough though. [1] https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class [2] https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set Signed-off-by: Stephen Finucane <[email protected]>
We've introduced a new field. Bump the manifests accordingly. Signed-off-by: Stephen Finucane <[email protected]>
Thanks. Done 👍 |
thanks, lgtm! |
Add the ability to set a
loadBalancerClass
value on theMetalLB
CRD. TheService.Spec.LoadBalancerClass
field reached GA in Kubernetes 1.24 and support was introduced in MetalLB in v0.13 1.Signed-off-by: Stephen Finucane [email protected]
Closes: #267