-
Notifications
You must be signed in to change notification settings - Fork 881
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
Push driver config during Init
#547
Conversation
Are there any changes to the remote API in this PR? If so, I don't see any updates to remote.md |
@tomdee There are no changes to remote API because of this. |
return err | ||
} | ||
updateDriverConfig(c, i.ntype, config, false) |
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.
shall we remove this call ? and rather initialize config := make(map[string]interface{})
inside the for.
that makes the code easily readable.
@mavenugo Updated to take care of the comments. PTAL |
} | ||
|
||
for _, i := range initializers { | ||
if err := i.fn(c, makeDriverConfig(c, i.ntype)); err != nil { |
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.
Can you please make this change in drivers_windows.go and drivers_freebsd.go as well ?
Currently the driver configuration is pushed through a separate api. This makes driver configuration possible at any arbitrary time. This unncessarily complicates the driver implementation. More importantly the driver does not get access to it's configuration before it can do the handshake with libnetwork. This make the internal drivers a little bit different to external plugins which can get their configuration before the handshake with libnetwork. This PR attempts to fix that mismatch between internal drivers and external plugins. Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
@mavenugo Updated again taking care of the comments. PTAL |
LGTM |
Push driver config during `Init`
Currently the driver configuration is pushed through a separate
api. This makes driver configuration possible at any arbitrary
time. This unncessarily complicates the driver implementation.
More importantly the driver does not get access to it's
configuration before it can do the handshake with libnetwork.
This make the internal drivers a little bit different to
external plugins which can get their configuration before the handshake
with libnetwork.
This PR attempts to fix that mismatch between internal drivers and
external plugins.
Signed-off-by: Jana Radhakrishnan mrjana@docker.com