-
Notifications
You must be signed in to change notification settings - Fork 1k
Fixed #1639 Apply filter to NodeReconciler similarly as PR #1607 #1666
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
Conversation
|
Hi @giulianopz , thanks for the PR! I have a couple of asks:
|
214a842 to
62206b0
Compare
|
Hi @fedepaol, It seems a conflict between the two unit tests, but I cannot understand where in the code the port 8080 is selected. |
|
Hi, sorry about the delay. I found the problem, which is about the controller metrics listener (don't know why, since every test stops the testEnv. In any case, the fix is to not listen for the metrics (in both the old and the new test, I guess): m, err := manager.New(cfg, manager.Options{MetricsBindAddress: "0"}) |
c77295c to
42500fb
Compare
This change applies a filter to the node reconciler (similarly as the one used for the config reconciler) to skip processing unnecessary node events other than node updates involving a change in its labels, since these labels are checked by the bgp controller. It will help reducing noise in the logs and avoid frequent reloads causing CPU usage spikes which seem to occasionally trigger failing probes and pod restarts. Signed-off-by: giuliano <panzironi.giuliano@gmail.com>
42500fb to
fb06919
Compare
Signed-off-by: giuliano <panzironi.giuliano@gmail.com>
| return node.Name == r.NodeName | ||
| }) | ||
|
|
||
| return newNodeObj.Name == newNodeObj.Name |
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.
this will always be true? Can you use the function you added here?
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.
Sorry, totally missed it. Ok, I will reuse the new function.
| Complete(r) | ||
| } | ||
|
|
||
| func (r *NodeReconciler) filter(obj client.Object) 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.
nit (just becauwe you need to change the code anyway), let's call this "filterOtherNodes"
|
LGTM, thanks! Let's wait for CI |
Fix as suggested by @mac-chaffee in issue #1639.