Add support for proxy plugins#2415
Conversation
Signed-off-by: Derek McGowan <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #2415 +/- ##
==========================================
- Coverage 44.99% 44.72% -0.28%
==========================================
Files 92 92
Lines 9398 9456 +58
==========================================
Hits 4229 4229
- Misses 4486 4544 +58
Partials 683 683
Continue to review full report at Codecov.
|
| if pc.clients == nil { | ||
| pc.clients = map[string]*grpc.ClientConn{} | ||
| } else if c, ok := pc.clients[address]; ok { | ||
| return c, nil |
There was a problem hiding this comment.
Does this conn work if the plugin crashed and restarted?
There was a problem hiding this comment.
It does. The trick is to not use WithBlock, so here I don't make that configurable.
|
Hi, just chinning in to say thanks for the PR, I believe I will find it very useful. However it is possible to add also a few lines of documentation so that it is relatively simple to get started? Cheers, |
On creating a plugin or configuring it? Looks like we need to improve some of the documentation for configuration. For creating, do you think it would be helpful to put my example in contrib? |
|
@dmcgowan Honestly I didn't have many problems in creating a plugin, like understand to create a grpc service and how to make it works. What I still do not understand is how to configure it, supposing I have a service already running with the correct interface, how do I tell containerd to contact it? As always, any, correct, up to date documentation is good documentation. |
|
LGTM |
|
Yay! |
|
Please, add few lines of documentation to this. |
Allows creation of proxy plugins by name, type, and address in the daemon configuration. If multiple plugins are using the same address, containerd will only use a single grpc client conn for that address.