-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add initial flow aggregation code and API #9708
Add initial flow aggregation code and API #9708
Conversation
417d848
to
8592398
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.
Left some comments about emitter package.
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.
I left a few more comments. But also approved the changes, as it looks great for initial PR.
NumConnectionsStarted: 1, | ||
} | ||
expectedBody, err := json.Marshal(flow) | ||
require.NoError(t, err) |
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.
We use gomega for assertion. Maybe we should stick to it and not use testify instead. Unless there is a good motivation for it. WDYT?
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.
Oh, yeah I started using this because it's used in some of the other Enterprise tests that I modeled this after and I sort of like this a bit better. But I could switch.
ExpectFlowsEqual(t, &exp, flows[0]) | ||
} else { | ||
// Should consistently return no flows. | ||
for i := 0; i < 10; i++ { |
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.
Maybe replace this with a consistently
assertion.
|
||
// Expect the aggregator to have received it. | ||
var flows []*proto.Flow | ||
require.Eventually(t, func() bool { |
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 same comment that if we should instead use gomega.
Description
This PR introduces a new component responsible for ingesting, aggregating, and the servering flow log data from the individual felix daemons deployed in a Calico cluster. This is still an early sketch of the component, but the major functional pieces are in place so it's a good place to start.
It is made of a few parts:
Related issues/PRs
Todos
Release Note
Reminder for the reviewer
Make sure that this PR has the correct labels and milestone set.
Every PR needs one
docs-*
label.docs-pr-required
: This change requires a change to the documentation that has not been completed yet.docs-completed
: This change has all necessary documentation completed.docs-not-required
: This change has no user-facing impact and requires no docs.Every PR needs one
release-note-*
label.release-note-required
: This PR has user-facing changes. Most PRs should have this label.release-note-not-required
: This PR has no user-facing changes.Other optional labels:
cherry-pick-candidate
: This PR should be cherry-picked to an earlier release. For bug fixes only.needs-operator-pr
: This PR is related to install and requires a corresponding change to the operator.