-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Add IPAM Config Options to match libnetwork #17316
Conversation
fcae0ea
to
f11620e
Compare
f11620e
to
ebace0a
Compare
Can someone run the userns build again. It timed out. Thanks |
@rmb938 done! |
Thanks :) |
Just got my dev environment working properly and the change works with the API but more discussion is needed on how to implement in the cli. |
Anyone care to look at this and possibly getting it merged? |
@rmb938 it's currently quite busy with preparations for the coming 1.9 release, so reviews will take longer than usual. Apologies for that, but hope you'll understand ❤️ |
@rmb938 the -d option was meant for the network drivers. am not too sure if we should conflate that to ipam drivers as well. Or maybe, we should namespace the |
I think implementing a --ipam-options or something would be better so it is more obvious to the user. |
@mavenugo Would --ipam-options be reasonable to add? |
@rmb938 I think so. |
4d795df
to
1da5f30
Compare
@mavenugo any idea why two of the tests failed? It doesn't seem like it is directly related to my changes. |
@mavenugo is this ready to move forward? I'm ok with adding an option to specify IPAM-options if the network team thinks these options should be available from the docker side |
1da5f30
to
fbab56b
Compare
de75f2b
to
786a1f1
Compare
Fixed the merge conflicts |
Thanks @rmb938! |
c.Assert(opts["opt1"], checker.Equals, "drv1") | ||
c.Assert(opts["opt2"], checker.Equals, "drv2") | ||
|
||
// remove network |
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.
No need for this cleanup.
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 don't fully understand what you mean. Do you want to get rid of the test?
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.
No, just this removal bit, the test suite will take care of removing the network.
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.
Oh ok will do.
One nit, LGTM if janky is happy. |
ping @thaJeztah @vdemeester for docs |
d39bdd4
to
8a093e0
Compare
|
||
cmd.Var(&flIpamSubnet, []string{"-subnet"}, "subnet in CIDR format that represents a network segment") | ||
cmd.Var(&flIpamIPRange, []string{"-ip-range"}, "allocate container ip from a sub-range") | ||
cmd.Var(&flIpamGateway, []string{"-gateway"}, "ipv4 or ipv6 Gateway for the master subnet") | ||
cmd.Var(flIpamAux, []string{"-aux-address"}, "auxiliary ipv4 or ipv6 addresses used by Network driver") | ||
cmd.Var(flOpts, []string{"o", "-opt"}, "set driver specific options") | ||
cmd.Var(flIpamOpt, []string{"-ipam-opt"}, "set ipam driver specific options") |
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.
s/ipam/IPAM/
8a093e0
to
bbe3999
Compare
docs LGTM 🐰 |
Oh, sorry, got called away for a bit; @rmb938 can you also update the example response/request in; Looks like this needs a rebase as well now |
@thaJeztah No problem. Since there are no default options what would you like me to put in there? Or just leave it empty? |
@rmb938 I think leaving it empty for now should be okay then; just to make people aware of its existence. Alternatively, you can add some "fake" options to illustrate what it looks like (e.g. foo=bar) |
bbe3999
to
6fb74e1
Compare
@thaJeztah Sounds good. How does that look. |
Awesome! LGTM |
@@ -14,6 +14,7 @@ docker-network-create - create a new network | |||
[**--ip-range**=*[]*] | |||
[**--ipam-driver**=*default*] | |||
[**-o**|**--opt**=*map[]*] | |||
[**--ipam-opt**=*map[]*] |
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.
this list should be ordered alphabetically. So this option needs to go after ipam-driver
.
Signed-off-by: Ryan Belgrave <rmb1993@gmail.com>
6fb74e1
to
662cac0
Compare
docs LGTM |
Add IPAM Config Options to match libnetwork
This should allow docker to pass through ipam config driver options to libnetwork.
I can't get my docker development environment working so I can't test this but it seems like it should work without breaking anything.Fully tested and works with the API. Still needs discussion on how to implement on the cli.Signed-off-by: Ryan Belgrave rmb1993@gmail.com