-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
MaintainIPPool refactor and support for aborting release handshake #18330
MaintainIPPool refactor and support for aborting release handshake #18330
Conversation
6621042
to
22315d9
Compare
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.
Good catch! Thank you.
Only some minor nits, nothing blocking.
22315d9
to
53f626a
Compare
@gandro Thanks for the review 🙇 |
/ci-eks |
/test-runtime |
/test-runtime |
… node Imagine a scenario where a node has 2 unused IPs and pre-allocate set to 1. Let's say one of the IPs is in the middle of a handshake and a new pod is scheduled on the node. The other unused IP would be allocated to the pod. Now, when the operator re-evaluates, the node is no longer considered to be in excess. Without this commit, the operator does not act further on IPs in this state. This results in a scenario where no new IPs are allocated to the node and agent cannot allocate the unused IPs because they're in the middle of a handshake. Signed-off-by: Hemanth Malla <hemanth.malla@datadoghq.com>
53f626a
to
ef5ed6b
Compare
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.
Thanks for the PR. The changes LGTM, could you update the 2nd commit msg with the motivation behind the refactor?
Given the current title of the PR plus the labels, if we merge & backport & release this as part of v1.11.1, then the PR will show up in the release notes under "Bugfixes" as |
…ol() With the addition of IP release handhake, maintainIPPool() became too long and not very readable. So, moving release and allocate logic into their own functions. Signed-off-by: Hemanth Malla <hemanth.malla@datadoghq.com>
Signed-off-by: Hemanth Malla <hemanth.malla@datadoghq.com>
ef5ed6b
to
ef6b386
Compare
@christarazi @joestringer Updated the commit message and added a release note. |
I see that this was previously marked |
Imagine a scenario where a node has 2 unused IPs and pre-allocate set to one. Let's say one of the IPs is in the middle of a handshake and a new pod is scheduled on the node. The other unused IP would be allocated to the pod. Now, when the operator re-evaluates, the node is no longer considered to be in excess. Without this commit, the operator does not act further on IPs in this state. This results in a scenario where no new IPs are allocated to the node and agent cannot allocate the unused IPs because they're in the middle of a handshake.
Also refactors IP release and allocate functionality out of maintainIPPool()