-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Report estimated expiry timers for connection-based FQDN entries #32013
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
Conversation
e8e42b0
to
84c0846
Compare
d1135ed
to
15772a8
Compare
15772a8
to
09fac0c
Compare
84c0846
to
cc4df44
Compare
cc4df44
to
32dc26f
Compare
/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.
Thanks! 🚀
PR looks good to me, but I think the current logic in the BenchmarkFqdnCache
is incorrect. Not sure if we want to tackle that in a follow up PR, though, since here we are just updating it as a consequence of the main changes.
32dc26f
to
4280d05
Compare
@pippolo84 done, thanks for the review. |
/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.
Thanks for splitting the commits nicely ❤️
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.
The changes along with comments make sense, LGTM!
Just a related q: the connection expiry times are not static, are they? The connection entry would be kept alive as long as there is traffic seen, regardless of when the next GC runs. I wonder if this warrants a documentation note as the expiration times are interpreted differently than DNS TTL.
4280d05
to
4aedd54
Compare
/test |
Correct. I've taken a stab at describing the behaviour here: #32350 . Strictly speaking this behaviour was already the case, the only difference with this PR is that the user-facing CLI output will reflect this more closely. |
This benchmark was broken (triggered segfault) and was based on the older go.check framework. Switch it to standard testing and fix it up. Signed-off-by: Joe Stringer <joe@cilium.io>
Modernize this code by using netip over net for filtering IPs. Signed-off-by: Joe Stringer <joe@cilium.io>
Split API request parsing from the code to form the model, so we can move the model output generation logic under pkg/fqdn in an upcoming patch. Signed-off-by: Joe Stringer <joe@cilium.io>
This will allow us to converge usage of this function by the FQDN dump routines to either directly look up one specific endpoint or to dump all endpoints via this function in an upcoming patch. Signed-off-by: Joe Stringer <joe@cilium.io>
Moving this logic into pkg/fqdn allows it to be more self-contained, and makes it easier to make changes solely within the pkg/fqdn package for future extensions of the filtering and formatting logic. Two changes are made to the main function being moved here: - At the start, use `NameManager.config.GetEndpointsDNSInfo()` to fetch the endpoints rather than pulling them from the EndpointManager directly. - Switch from pulling the `endpoint.ID` field to `endpoint.ID64`. Signed-off-by: Joe Stringer <joe@cilium.io>
Report the expiry time for entries kept alive based on connection state as the next time that connection tracking garbage collection runs. This way, the expiration time should be closer to the actual expiry time rather than simply reporting the zero timestamp. Signed-off-by: Joe Stringer <joe@cilium.io>
4aedd54
to
795d80b
Compare
/test |
Based on #32012
Report the expiry time for entries kept alive based on connection state
as the next time that connection tracking garbage collection will run.
This way, the expiration time should be closer to the actual expiry time
rather than simply reporting the zero timestamp.
Commits 1-5 do some refactoring and cleanups in preparation for the target
feature in this PR. The final commit has the functional changes.
Related: #24246
Fixes: #21540