Skip to content

Add support for proxy plugins#2415

Merged
AkihiroSuda merged 1 commit intocontainerd:masterfrom
dmcgowan:proxy-plugins
Jul 18, 2018
Merged

Add support for proxy plugins#2415
AkihiroSuda merged 1 commit intocontainerd:masterfrom
dmcgowan:proxy-plugins

Conversation

@dmcgowan
Copy link
Copy Markdown
Member

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.

@dmcgowan dmcgowan added this to the 1.2 milestone Jun 22, 2018
@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #2415 into master will decrease coverage by 0.27%.
The diff coverage is 0%.

Impacted file tree graph

@@            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
Flag Coverage Δ
#linux 48.93% <0%> (-0.31%) ⬇️
#windows 40.95% <0%> (-0.31%) ⬇️
Impacted Files Coverage Δ
services/server/config.go 0% <ø> (ø) ⬆️
services/server/server.go 1.67% <0%> (-0.54%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ff2748...7049671. Read the comment docs.

Comment thread services/server/server.go
if pc.clients == nil {
pc.clients = map[string]*grpc.ClientConn{}
} else if c, ok := pc.clients[address]; ok {
return c, nil
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this conn work if the plugin crashed and restarted?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does. The trick is to not use WithBlock, so here I don't make that configurable.

@siscia
Copy link
Copy Markdown

siscia commented Jun 25, 2018

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,

@dmcgowan
Copy link
Copy Markdown
Member Author

dmcgowan commented Jul 6, 2018

However it is possible to add also a few lines of documentation so that it is relatively simple to get started?

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?

@siscia
Copy link
Copy Markdown

siscia commented Jul 9, 2018

@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.

@crosbymichael
Copy link
Copy Markdown
Member

LGTM

@AkihiroSuda AkihiroSuda merged commit 02579c8 into containerd:master Jul 18, 2018
@cpuguy83
Copy link
Copy Markdown
Member

Yay!

@siscia
Copy link
Copy Markdown

siscia commented Jul 18, 2018

Please, add few lines of documentation to this.

@dmcgowan dmcgowan mentioned this pull request Jul 19, 2018
@dmcgowan dmcgowan deleted the proxy-plugins branch September 10, 2019 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants