-
Notifications
You must be signed in to change notification settings - Fork 596
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
[octavia-lb] Add the logic to reattach the VIP to the load balancer if the IP has changed #2451
Conversation
Welcome @yang-wang11! |
Hi @yang-wang11. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test all |
@yang-wang11: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
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 think this enables users of the cluster to set spec.loadBalancerIP=""
, wait for a new FIP to get attached and repeat the process until all FIPs are exhausted. We shouldn't allow that. At minimum old FIP has to be deleted if it was created by the CPO.
Seems like this also breaks shared LBs:
Not that I like the feature, but we cannot just break it. |
@dulek Great observation, I will take some time to refactor this function to lessen the if-else. |
/retest |
/assign @yang-wang11 |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
docs/openstack-cloud-controller-manager/expose-applications-using-loadbalancer-type-service.md
Show resolved
Hide resolved
/test all |
/retest |
@kayrus I'm not trying to rush you, but kindly look forward to your code review. |
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.
@yang-wang11 apologies that you had to wait. See my comments. As for the new ensureFloatingIP
logic, give me a bit more time.
@@ -74,6 +74,7 @@ const ( | |||
ServiceAnnotationLoadBalancerFloatingSubnetTags = "loadbalancer.openstack.org/floating-subnet-tags" | |||
ServiceAnnotationLoadBalancerClass = "loadbalancer.openstack.org/class" | |||
ServiceAnnotationLoadBalancerKeepFloatingIP = "loadbalancer.openstack.org/keep-floatingip" | |||
ServiceAnnotationLoadBalancerFloatingIP = "loadbalancer.openstack.org/floating-ip" |
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.
in order to comply with the previous naming, I'd suggest to use loadbalancer.openstack.org/floatingip
in future for dual stack we can use loadbalancer.openstack.org/floatingip-v6
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 guess you mean loadbalancer.openstack.org/floatingip-v4
as the proposal. That's good for me.
@@ -431,6 +432,19 @@ func getSecurityGroupName(service *corev1.Service) string { | |||
return securityGroupName | |||
} | |||
|
|||
func getLoadBalancerIP(service *corev1.Service) string { | |||
if annotations := service.Annotations; annotations != nil { |
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.
we can skip this check. if val, ok := annotations[ServiceAnnotationLoadBalancerFloatingIP]; ok && val != "" {
is enough.
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.
Yes, it is used to avoid panic if there is no annotation. adopt your suggestion, it can cover my concern.
https://go.dev/play/p/RDerITo3dqp?v=goprev
@yang-wang11 Unfortunately I have doubts about the proposed An example: cloud-provider-openstack/pkg/openstack/loadbalancer.go Lines 965 to 968 in d6f294d
why would we fail in this case? What if the loadbalancer has a There are also a bunch of minor concerns, which combination in result raises other questions. Basically this is the reason why the #2377 PR is still in draft. IMO the first step that we need to perform is to extend the mock API with Octavia support and add test cases which include a collection of different annotation combinations for services. @yang-wang11 how critical is the issue for you? Does it occur only on svc update only? |
@kayrus |
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@yang-wang11 can you resolve the conflicts? |
|
||
This annotation is utilized to specify the floating IP for the load balancer. | ||
|
||
If set, both newly created and pre-existing load balancers will utilize it. Furthermore, its precedence is higher than that of `Spec.LoadBalanccerIP`. |
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.
If set, both newly created and pre-existing load balancers will utilize it. Furthermore, its precedence is higher than that of `Spec.LoadBalanccerIP`. | |
If set, both newly created and pre-existing load balancers will utilize it. Furthermore, its precedence is higher than that of `Spec.LoadBalancerIP`. |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What this PR does / why we need it:
Which issue this PR fixes(if applicable):
fixes #2443
Special notes for reviewers:
Release note: