-
Notifications
You must be signed in to change notification settings - Fork 3.4k
daemon: refactor Hubble Exporters as a cell #35596
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
daemon: refactor Hubble Exporters as a cell #35596
Conversation
e817568
to
e11af17
Compare
e5b6738
to
ccbdf7a
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.
Nice work @devodev 👍
Some comments and questions inline. Also I noticed that in exporter.Stop()
we're closing the writer, which can be setup with os.Stdout
and I don't think we're supposed to close stdout. Not to be addressed in this PR, but something to look into. cc @chancez whom I added as a reviewer as well since he has context about export.
Looked into it, and it seems we use a |
Yep, there was previously a bug where we were closing |
b76d39d
to
81255ab
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.
Nice work 🚀
Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com>
8c317f7
to
2f7a251
Compare
/test |
@kaworu ping 🏓 |
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.
Focused my review on the newly added cells and the usage of the "hive and cells" framework. LGTM, thanks! 💯
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.
Awesome work @devodev 👏 !
Hubble export allow/deny list parsing regressed in cilium#35596 when moving export to a hive cell due to how hive cells handle flags.StringSlices. Similar to cilium#35619. Redefine the flag as a string and parse it ourselves to avoid going through the implicit hive decoder hooks that convert strings to slices by splitting on comma. Also added tests for the hubble.ParseFlowFilters helper to make it clear which formats we support and which we don't. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com>
Hubble export allow/deny list parsing regressed in cilium#35596 when moving export to a hive cell due to how hive cells handle flags.StringSlices. Similar to cilium#35619. Redefine the flag as a string to avoid going through the implicit hive decoder hooks that convert strings to slices by splitting on comma. Update hubble.ParseFlowFilters to take in a string and decode all filters until EOF. Also added tests for the hubble.ParseFlowFilters helper to make it clear which formats we support and which we don't. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com>
Hubble export allow/deny list parsing regressed in cilium#35596 when moving export to a hive cell due to how hive cells handle flags.StringSlices. Similar to cilium#35619. Redefine the flag as a string to avoid going through the implicit hive decoder hooks that convert strings to slices by splitting on comma. Update hubble.ParseFlowFilters to take in a string and decode all filters until EOF. Also added tests for the hubble.ParseFlowFilters helper to make it clear which formats we support and which we don't. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com>
Hubble export allow/deny list parsing regressed in cilium#35596 when moving export to a hive cell due to how hive cells handle flags.StringSlices. Similar to cilium#35619. Redefine the flag as a string to avoid going through the implicit hive decoder hooks that convert strings to slices by splitting on comma. Update hubble.ParseFlowFilters to take in a string and decode all filters until EOF. Also added tests for the hubble.ParseFlowFilters helper to make it clear which formats we support and which we don't. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com>
Hubble export allow/deny list parsing regressed in #35596 when moving export to a hive cell due to how hive cells handle flags.StringSlices. Similar to #35619. Redefine the flag as a string to avoid going through the implicit hive decoder hooks that convert strings to slices by splitting on comma. Update hubble.ParseFlowFilters to take in a string and decode all filters until EOF. Also added tests for the hubble.ParseFlowFilters helper to make it clear which formats we support and which we don't. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com>
[ upstream commit cb3341b ] Hubble export allow/deny list parsing regressed in #35596 when moving export to a hive cell due to how hive cells handle flags.StringSlices. Similar to #35619. Redefine the flag as a string to avoid going through the implicit hive decoder hooks that convert strings to slices by splitting on comma. Update hubble.ParseFlowFilters to take in a string and decode all filters until EOF. Also added tests for the hubble.ParseFlowFilters helper to make it clear which formats we support and which we don't. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com> Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
[ upstream commit cb3341b ] Hubble export allow/deny list parsing regressed in #35596 when moving export to a hive cell due to how hive cells handle flags.StringSlices. Similar to #35619. Redefine the flag as a string to avoid going through the implicit hive decoder hooks that convert strings to slices by splitting on comma. Update hubble.ParseFlowFilters to take in a string and decode all filters until EOF. Also added tests for the hubble.ParseFlowFilters helper to make it clear which formats we support and which we don't. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com> Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
Hubble export allow/deny list parsing regressed in cilium#35596 when moving export to a hive cell due to how hive cells handle flags.StringSlices. Similar to cilium#35619. Redefine the flag as a string to avoid going through the implicit hive decoder hooks that convert strings to slices by splitting on comma. Update hubble.ParseFlowFilters to take in a string and decode all filters until EOF. Also added tests for the hubble.ParseFlowFilters helper to make it clear which formats we support and which we don't. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com>
Continuation of #35206
hubble-exporters
cell that provides the static and dynamic exporters using observer Options.OnDecodedEvent
instead of embedding one at construct time.OnExportEvent
hook system to the exporter to provide extension capabilities.Related: #35514