-
Notifications
You must be signed in to change notification settings - Fork 471
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
[jjo] support also using status.loadBalancer.ingress IPs via annotation #339
Conversation
c15f784
to
449a887
Compare
👍 nicely done! Tests would be nice though |
eb3ca2e
to
f30795d
Compare
@jjo Can you please rebase. Apologies for delay in the review. Wondering do we need an annotation? If the load balancer IP is set would it make sense to interpret it just as external IP. |
f30795d
to
a2daf09
Compare
nw, just done it.
Afaics the (only?) use case for landing LB IPs locally at nodes would |
* support also using status.loadBalancer.ingress IPs via kube-router.io/service.uselbips: "true" annotation * this annotation is set for a LoadBalancer service, the ingress IP(s) set by the LoadBalancer will: - be locally added to nodes (to `kube-dummy-if` network iface, to LVS) - be advertised to BGP peers
…Ps() to reuse essentially same pre-existing code
e21b3df
to
488fbf0
Compare
So i see two different aspects here. One aspect is setting up service proxy to the LoadBalancer IP as VIP and setting up its endpoints. Second is how the traffic really ends up at a node for load-balncer IP. In baremetal deployments each node (through kube-router) can advertises the loadbalancer IP so we have ECMP load balancing. Kube-router already does this with I have to test it though, with your changes to network service controller, service of I am not sure what benefit we get enabling selectivley few services with annotation. |
Concur. Perhaps flip it to have an annotation to turn it off (if a user is worried about it interfering with cloud provider networking), or as a kube-router flag. This has the benefit of being a massively better user experience for both on premise clusters (like mine) and cloud clusters running kube-router. |
Thanks @murali-reddy @SEJeff for the feedback, I still think the user |
Thanks @jjo for your patience :) i will test it out today this functionality with ELB to see what would be ideal default behaviour. |
|
||
if !nodeHasEndpoints { | ||
for _, externalIP := range svc.Spec.ExternalIPs { | ||
err := nrc.UnadvertiseClusterIp(externalIP) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it makes sense to call UnadvertiseClusterIp
in getExternalIps()
. WDTY?
if svc.uselbips { | ||
extIPSet = extIPSet.Union(sets.NewString(svc.loadBalancerIPs...)) | ||
} | ||
glog.V(2).Infof("Service \"%s\" using extIPSet: %v", svc.name, extIPSet.List()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: you can use %q
if you want quotes on your strings
Documentation/README.md
Outdated
If you want to also advertise loadbalancer set IPs | ||
(`status.loadBalancer.ingress` IPs), e.g. when using it with MetalLb, | ||
add the `--advertise-loadbalancer-ip` flag (`false` by default). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is perfect from a user workflow. Thanks for humoring me!
Thanks folks for the reviews - I've messed with the branches while |
No description provided.