-
Notifications
You must be signed in to change notification settings - Fork 3.4k
loadbalancer: Add file-based reflector #39117
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/test |
joamaki
commented
Apr 24, 2025
joamaki
commented
Apr 24, 2025
9cd10f9
to
2714509
Compare
/test |
1 similar comment
/test |
oblazek
reviewed
Apr 28, 2025
bb351c9
to
ab7ecc1
Compare
In preparation for adding another reflector that uses the same conversion functions, move them to conversions.go and clean up cell.go to refer to the K8sReflectorCell only. Add source argument to the conversion functions. Signed-off-by: Jussi Maki <jussi@isovalent.com>
After the code reorg the benchmarks were not updated to point to the correct files. Signed-off-by: Jussi Maki <jussi@isovalent.com>
Signed-off-by: Jussi Maki <jussi@isovalent.com>
When converting a k8s Service or Endpoints to the internal models debug log when we ignore data due to configuration or failure to parse it. The log.With() is pretty expensive, so we use sync.OnceValue to lazily do it. Without this we'd be 20% slower in convertService(). This does have a measurable impact on cases where we e.g. have EnableIPv6=false and lots of services or backends have IPv6 addresses. We'd hit log.With() and log.Debug() and likely be 20-30% slower. In practice though this wouldn't really be measurable. Before: BenchmarkConvertService-32 1326844 894.0 ns/op 1118506 services/sec BenchmarkConvertEndpoints-32 2550249 452.6 ns/op 2209461 endpoints/sec After: BenchmarkConvertService-32 1241847 905.2 ns/op 1104687 services/sec BenchmarkConvertEndpoints-32 3043005 438.2 ns/op 2282010 endpoints/sec Signed-off-by: Jussi Maki <jussi@isovalent.com>
ab7ecc1
to
efc1c02
Compare
aspsk
approved these changes
May 11, 2025
oblazek
approved these changes
May 12, 2025
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.
LGTM!
/test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
release-note/misc
This PR makes changes that have no direct user impact.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As the
cilium-dbg service update
is being removed (#39084) we need a different mechanism for serving the use-case.This implements a file-based synchronization for the load-balancing state by using the Kubernetes Service and EndpointSlice formats, which makes for a simple implementation that is also familiar to users.