-
Notifications
You must be signed in to change notification settings - Fork 101
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
CP/DP Split: track agent connections #2970
CP/DP Split: track agent connections #2970
Conversation
Added the following: - middleware to extract IP address of agent and store it in the grpc context - link the agent's hostname to its IP address when connecting and track it - use this linkage to pause the Subscription until the agent registers itself, then proceeding This logic is subject to change as we enhance this (like tracking auth token instead of IP address).
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## change/control-data-plane-split #2970 +/- ##
===================================================================
- Coverage 89.74% 88.61% -1.13%
===================================================================
Files 109 111 +2
Lines 11150 11212 +62
Branches 50 50
===================================================================
- Hits 10007 9936 -71
- Misses 1083 1223 +140
+ Partials 60 53 -7 ☔ View full report in Codecov by Sentry. |
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 know a lot of this code will end up changing, but are there any files or components you feel confident in that we can write unit tests for now?
internal/mode/static/nginx/agent/grpc/interceptor/interceptor.go
Outdated
Show resolved
Hide resolved
internal/mode/static/nginx/agent/grpc/interceptor/interceptor.go
Outdated
Show resolved
Hide resolved
Honestly, not really. I think the meat of these functions will change as we implement the next few stories. |
Co-authored-by: bjee19 <139261241+bjee19@users.noreply.github.com>
Added the following:
This logic is subject to change as we enhance this (like tracking auth token instead of IP address).
Testing: Verified that connections are mapped properly between CreateConnection and Subscribe calls and that the subscription waits properly. Scaled nginx to multiple replicas and saw all connections.
Closes #2851