-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Refactor Hubble as a cell #35206
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
Refactor Hubble as a cell #35206
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.
That's a massive cleanup and improvement! I initially feared reviewing this PR given the lines diff and the number of commits but how you broke the changes into multiple commits with detailed explanation of why each change is required is brilliant and made my work as a reviewer surprisingly easy!
With that said, the changes look good to me overall. It's a massive step forward in terms of modularizing the Hubble subsystem and highlights where we could still improve. The only minor concern I have is related to Validate() error
(see comment below).
c530ac9
to
ab8cbc2
Compare
ab8cbc2
to
c56bee9
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.
Impressive work, and like Robin I loved the way you broke it down into small commits. Looks good to me! 🚀
7fa7696
to
ee4487b
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.
Great work - looks very good! Thanks a lot for tackling this! 😍 🎉
I left some small comments / suggestions inline.
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 contribution and time spent to split the commits 🚀
34c2eed
to
3c25145
Compare
Validation of HTTP header redaction has moved from DaemonConfig.Populate() to the Hubble's Config Validate() func. Signed-off-by: Alexandre Perrin <alex@isovalent.com>
The --hubble-drop-events-reasons flag is now registered through pflags as a string slice (previously registered as a string). This change has two minor implications: it is now possible to provide the flag multiple times, and each flag value are treated as comma-separated values (previously white spaces separated). For the latter, it should not create issue since the reasons values don't contains commas, and a backward compatible logic has been implemented. The viper-check.sh change allow viper.{Get,Set} in go comments lines. Signed-off-by: Alexandre Perrin <alex@isovalent.com>
Explicit the contract between the Hubble integration and the Cilium agent. Signed-off-by: Alexandre Perrin <alex@isovalent.com>
Now that all Hubble related code has been extracted from the Cilium daemon, we can hide away the Hubble integration implementation details from other packages. Signed-off-by: Alexandre Perrin <alex@isovalent.com>
Before this patch, the Cilium daemon was responsible to "launch hubble", i.e. handle Hubble components startup. Now that Hubble is fully integration into the hive/cell framework, we can plug into its life cycle management and free the Cilium daemon from starting Hubble. Signed-off-by: Alexandre Perrin <alex@isovalent.com>
Instead of using the global logging.DefaultLogger. Signed-off-by: Alexandre Perrin <alex@isovalent.com>
3cf6e3a
to
22984e0
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!
/test |
As part of cilium#35206, we refactored Hubble as a Hive cell, and we inadvertedly changed the default EnableHubble to true. Since the helm chart defaults to not setting EnableHubble at all if the option is false in the values file, it is currently not possible to disable Hubble. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com>
As part of cilium#35206, we refactored Hubble as a Hive cell, and we inadvertently changed the default EnableHubble to true. Since the helm chart defaults to not setting EnableHubble at all if the option is false in the values file, it is currently not possible to disable Hubble. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com>
As part of cilium#35206, we refactored Hubble as a Hive cell, and we inadvertently changed the default EnableHubble to true. Since the helm chart defaults to not setting EnableHubble at all if the option is false in the values file, it is currently not possible to disable Hubble. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com>
As part of #35206, we refactored Hubble as a Hive cell, and we inadvertently changed the default EnableHubble to true. Since the helm chart defaults to not setting EnableHubble at all if the option is false in the values file, it is currently not possible to disable Hubble. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com>
[ upstream commit 97aeb9e ] As part of #35206, we refactored Hubble as a Hive cell, and we inadvertently changed the default EnableHubble to true. Since the helm chart defaults to not setting EnableHubble at all if the option is false in the values file, it is currently not possible to disable Hubble. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com> Signed-off-by: Nicolas Busseneau <nicolas@isovalent.com>
[ upstream commit 97aeb9e ] As part of #35206, we refactored Hubble as a Hive cell, and we inadvertently changed the default EnableHubble to true. Since the helm chart defaults to not setting EnableHubble at all if the option is false in the values file, it is currently not possible to disable Hubble. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com> Signed-off-by: Nicolas Busseneau <nicolas@isovalent.com>
[ upstream commit 97aeb9e ] As part of #35206, we refactored Hubble as a Hive cell, and we inadvertently changed the default EnableHubble to true. Since the helm chart defaults to not setting EnableHubble at all if the option is false in the values file, it is currently not possible to disable Hubble. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com> Signed-off-by: Nicolas Busseneau <nicolas@isovalent.com>
[ upstream commit 97aeb9e ] As part of #35206, we refactored Hubble as a Hive cell, and we inadvertently changed the default EnableHubble to true. Since the helm chart defaults to not setting EnableHubble at all if the option is false in the values file, it is currently not possible to disable Hubble. Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com> Signed-off-by: Nicolas Busseneau <nicolas@isovalent.com>
Part of #34501, Better reviewed commit by commit.
Refactor Hubble configuration and initialization using hive/cell. The rational and goal / non-goal are explained in the referenced issue as well as in the second commit:
I tried my best to split into reviewable chunk, each commit focusing on moving one well defined part. As a result, there are a lot of commits (sorry). I considered opening multiples PRs for each refactoring stages, but OTHO it would increase the likelihood of conflicting with other PRs and I'm not looking forward to handle merge conflicts related to such a huge code shuffle, but if reviewers feels it is necessary then I'll do it.
Conceptually, there are four stages implemented:
launchHubble()
. This stage is a prerequisite to be able to move Hubble startup into its own new cell,launchHubble()
code into the new Hubble cell,