-
Notifications
You must be signed in to change notification settings - Fork 3.4k
hubble: refactor the Namespace Manager as a Cell #41679
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: refactor the Namespace Manager as a Cell #41679
Conversation
glrf
left a comment
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.
Overall LGTM, nice cleanup. Only question is, if we really want to introduce another module for this. But that's non blocking from my side.
devodev
left a comment
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 think I agree with @glrf about using a cell directly instead of a module.
Since the job is named clearly, I don't think we need the additional scope created by the module.
This is a move/rename only commit preparing the structure to refactor the namespace manager as a Cell. Signed-off-by: Alexandre Perrin <alex@isovalent.com>
For testing purposes, reducing the use of the public namespace.NewManager. Cosmetic dedup in local_observer_test.go on the way, making noopParser accept testing.TB as param. Signed-off-by: Alexandre Perrin <alex@isovalent.com>
Setup the namespace cleanup as a job.Timer instead of open-coding in our own goroutine. Signed-off-by: Alexandre Perrin <alex@isovalent.com>
e634e9a to
8383e4f
Compare
|
/test |
rolinh
left a comment
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, lgtm!
Better reviewed commit by commit.
manual test
Use 5s for cleanup and 1m for TTL to avoid waiting too long 😅
Check that the ns manager job has started, and we don't see
defaultin the namespace list.Run curl from the
defaultnamespace to generate a Hubble flow, check the timestamp and that nowdefaultshows up in the Hubble namespace list.wait for the TTL to expire
% sleep 1mNow check the logs, the cleanup has been called every 5s as expected, and
defaultis no longer part of the Hubble namespace list.Closes: #40064