Skip to content
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

feat: add pod controller to trigger EIP reconciles on pod replacement #10

Closed
wants to merge 1 commit into from

Conversation

alfredkrohmer
Copy link
Collaborator

Pod UID is saved in the status field of the EIP resource to distinguish
different pods with the same name.

Fixes #9.

Pod UID is saved in the status field of the EIP resource to distinguish
different pods with the same name.
@TrueTechy
Copy link

So I tried some changes to the pod controller as the comparison didn't seem to match the desired result and the update call was returning a NotFound from the API Server but updating the whole object worked fine.

I also updated the change detection logic so it'd be happier with not having the privateIP in the spec to stop the check error about there being more than one assignment option being set after a change is detected and the original assignment wasn't the Pod IP.

I've deployed this version to our cluster and it has so far been behaving but I appreciate there may be some issues with these changes for other uses of the operator

TrueTechy@25055d8

@benesch
Copy link

benesch commented Jul 1, 2021

Hey @devkid, sorry to bug ya, but what's the status on this? @TrueTechy's patch looks good to my eye (though I haven't actually tried it).

@TrueTechy
Copy link

TrueTechy commented Jul 6, 2021

I think my patch needs some further work. In my use of the operator it's getting stuck trying to reconcille pods that have been deleted and so it needs restarted to reassign the EIPs to the new pods. It's been on the todo list but as with everything something always comes up that takes priority 😞

Not entirely sure how I managed it but in attempting to debug my branch I found that it actually works as expected. I can only assume I pushed up master or something as our test image. Still complains about the pod not being there when it's been deleted but it does reassign the IP to the newly created pod as expected

@alfredkrohmer
Copy link
Collaborator Author

Closing in favor of #16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EIP not reassociate when pod moves
3 participants