-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
hubble: Support --{last,since,until} on agent and debug events #14739
hubble: Support --{last,since,until} on agent and debug events #14739
Conversation
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.
Looks good but see question/comment about when to increment r.eventCount
.
With the introduction of agent and debug events, this reader, while implementing the GetFlows API, actually now returns events which are different from flows. This commit renames the involved types and variables to reflect that. This commit contains no functional changes. Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
741ddd7
to
a8c28ce
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.
Minor nit on the PR description/commit message:
This PR ensures that the Number, Until and Since filters on
the GetFlowsRequest are treated the same on agent and flow events as
they are on flow events.
I assume this should say "...the GetFlowsRequest are treated the same on agent and debug events as they are on flow events."?
This commit ensures that the `Number`, `Until` and `Since` filters on the `GetFlowsRequest` are treated the same on agent and debug events as they are on flow events. Previously, the observer API would only stop reading from the ring buffer once it had collected enough flows. All interleaved debug and agent events were returned without proper accounting (assuming they were allows by the event type filter). This meant that if a request was only requesting agent and/or debug events, that it would try to dump all such events in the ring buffer. Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
a8c28ce
to
44a05f5
Compare
test-me-please |
GKE failed to scale cluster https://jenkins.cilium.io/job/Cilium-PR-K8s-GKE/4146/ retest-gke |
retest-runtime |
retest-4.9 |
This PR ensures that the
Number
,Until
andSince
filters onthe
GetFlowsRequest
are treated the same on agent and debug events asthey are on flow events.
Previously, the observer API would only stop reading from the ring
buffer once it had collected enough flows. All interleaved debug and
agent events were returned without proper accounting (assuming they were
allows by the event type filter). This meant that if a request was only
requesting agent and/or debug events, that it would try to dump all such
events in the ring buffer.
The first commit in this PR is a simple refactor renaming
flowsReader
toeventsReader
.It should not contain any functional changes.