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
Support for external daemon plugins #39615
base: master
Are you sure you want to change the base?
Conversation
Just quickly glancing over, but this allows plugins to register their own endpoints? should those custom endpoints be namespaced (taking the odd case into account that someone uses an authz plug-in or other means to blacklist endpoints)? Might have to be described somewhere in https://github.com/moby/moby/blob/master/docs/api/version-history.md |
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.
just some quick questions after looking at this from my phone 🤗
807b39e
to
269b3ce
Compare
Each daemon plugin is namespaced (by default |
|
||
const ( | ||
// GRPCPlugin implements a grpc service | ||
GRPCPlugin Type = "io.docker.grpc.v1" |
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'm thinking if we should use com.docker...
instead of io.docker...
. Looking through the codebase, it looks like we use com.docker..
for swarmkit labels, libnetwork options, and some other places, so it might be more consistent.
269b3ce
to
967ed6d
Compare
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.
SGTM
In terms of adding ability to bring in new functionality for the daemon endpoints, this looks like a desirable PR. I'm expecting this does not imply bringing over all of the current HTTP endpoints of the daemon into gRPC.
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
967ed6d
to
1a868cd
Compare
needs rebase |
This adds support for external daemon plugins (currently GRPC). This is a light port of the containerd plugin model where plugins can
Register
as a daemon plugin. These are then initialized at init and can operate directly with the daemon. This is useful, for example, if a plugin needs to operate on an internal system such as the content store that is not accessible via the API.An example plugin could be something like this:
Then plugins can simply be included at build time with a blank import: