-
Notifications
You must be signed in to change notification settings - Fork 405
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
Implement multiplexer proxy. #2141
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2141 +/- ##
===========================================
- Coverage 58.93% 45.13% -13.81%
===========================================
Files 210 418 +208
Lines 18968 28552 +9584
===========================================
+ Hits 11179 12887 +1708
- Misses 6707 14373 +7666
- Partials 1082 1292 +210
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
44acb84
to
8ecdab1
Compare
Quality Gate passedIssues Measures |
4171c61
to
aed7925
Compare
|
||
return &multiplexerManager{ | ||
restStoreManager: restStoreManager, | ||
restMapper: kmeta.NewDefaultRESTMapperFromScheme(), |
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.
The RestScope in kmeta.NewDefaultRESTMapperFromScheme()
is fixed as namespace
as following, I think we need to improve kmeta.NewDefaultRESTMapperFromScheme()
for multiplexer.
scope := meta.RESTScopeNamespace |
4f1ad5f
to
d6c4a47
Compare
@@ -86,13 +86,15 @@ const ( | |||
CacheUserAgentsKey = "cache_agents" | |||
PoolScopeResourcesKey = "pool_scope_resources" | |||
|
|||
MultiplexerProxyClientUserAgent = "multiplexer-proxy" |
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.
how about name MultiplexerProxyClientUserAgent
to fmt.Sprintf("multiplexer-proxy-%s", strings.ToLower(nodeName))?
} | ||
|
||
func (sm *storageManager) restClient(gvr *schema.GroupVersionResource) (rest.Interface, error) { | ||
httpClient, _ := rest.HTTPClientFor(sm.config) |
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 we should not skip err here
Quality Gate passedIssues Measures |
return nil, errors.Wrapf(err, "failed to get rest client for %v", gvr) | ||
} | ||
|
||
rs := &store{ |
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.
rs := NewStore(restClient, gvr.Resource)
} | ||
} | ||
|
||
func (rs *store) GetList(ctx context.Context, key string, opts storage.ListOptions, listObj runtime.Object) error { |
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.
paramter key
is unused?
What type of PR is this?
What this PR does / why we need it:
Implement the shared cache module in node-level traffic multiplexing, referencing the Design Proposal.
Does this PR introduce a user-facing change?
"NONE"