-
Notifications
You must be signed in to change notification settings - Fork 10
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
EIP not reassociate when pod moves #9
Comments
Unfortunately with the current logic, it's not easy to detect when the corresponding pod gets deleted / recreated / rescheduled, we would need to add a separate pod controller that checks for every pod that is created if an EIP is attached and then trigger the reconciliation for this EIP. Since you expect this to happen automatically, I assume your pod name stays constant, hence you are using singel pods or a StatefulSet, is that correct? |
I just created a pull request #10 with a potential fix. Would you mind trying this out from my branch? |
Hi there, first off thank you so much for the work you've done on this it's helped us solve some problems I'm not sure we would've otherwise. We are using a stateful set so the name will stay the same between the same between rescheduling. I tested out your PR branch and it detected the pod has been rescheduled, but it seems to have put the private IP in the spec as well as the status of the object so it threw an error about only specifying one of the assignment options
I removed the privateIpAddress like before from the EIP spec and then it assigned to the new pod without issue |
I'll preface this by saying I've not written much in Go, just enough to be dangerous kind of thing. I found that when the status is set to the spec (eip_controller.go#L377) they seem to become linked, so then on L378 when the privateIP address is set in the status, it's also set in the EIP spec. I tried setting #L377 to |
This should be solved via #16. |
When a node is terminated and our pod was moved to another node the EIP didn't update to follow the pod by name to the new node. I noticed the spec is updated to include the Pods IP when it's created but then when the new pod came up with a new IP that wasn't updated in the EIP config.
Our EIP yaml is
Is there a way we can get the EIP to follow the pod when it's rescheduled? I found by removing the privateIPAddress from the assignment using
kubectl edit eip test-eip
then the controller detected that and assigned the EIP as expected but ideally this would happen without interventionThe text was updated successfully, but these errors were encountered: