-
Notifications
You must be signed in to change notification settings - Fork 782
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 CNI_ARGS in static IPAM plugin #165
Changes from 1 commit
6da1cb7
3b3622d
cc3ad26
60a99ca
321467b
61c1361
61a412e
094c903
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
This change is to add CNI_ARGS support in static IPAM plugin. When IP/SUBNET/GATEWAY are given in CNI_ARGS, static IPAM adds these info in addition to config files. To configure ip address only from CNI_ARGS, 'address' field in config is changed to optional from required.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,8 +38,17 @@ static IPAM is very simple IPAM plugin that assigns IPv4 and IPv6 addresses stat | |
## Network configuration reference | ||
|
||
* `type` (string, required): "static" | ||
* `addresses` (array, required): an array of arrays of ip address objects: | ||
* `addresses` (array, optional): an array of arrays of ip address objects: | ||
* `address` (string, required): CIDR notation IP address. | ||
* `gateway` (string, optional): IP inside of "subnet" to designate as the gateway. | ||
* `routes` (string, optional): list of routes add to the container namespace. Each route is a dictionary with "dst" and optional "gw" fields. If "gw" is omitted, value of "gateway" will be used. | ||
* `dns` (string, optional): the dictionary with "nameservers", "domain" and "search". | ||
|
||
## Supported arguments | ||
The following [CNI_ARGS](https://github.com/containernetworking/cni/blob/master/SPEC.md#parameters) are supported: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing new line before this one. Please keep that in sync with rest of document. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||
|
||
* `IP`: request a specific IP address from a subnet | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||
* `SUBNET`: request a specific subnet | ||
* `GATEWAY`: request a specific gateway address | ||
|
||
(example: CNI_ARGS="IP=10.10.0.1;SUBNET=10.10.0.0/24;GATEWAY=10.10.0.254") |
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.
That's incorrect even in master - it's an array of ip addresses, not an array of arrays.
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.
Fixed.