Bruce Ma
af26bab500
host-local: support ip/prefix in env args and CNI args
...
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2021-05-17 21:12:45 +08:00
Bruce Ma
028fc2f219
host-local: support custom IPs allocation through runtime configuration
...
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2021-04-13 17:53:43 +08:00
Bruce Ma
b811967444
remove redundant startRange in RangeIter due to overlap check on multi ranges
...
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2021-03-04 11:50:54 +08:00
Dan Williams
7d8c767622
plugins: update to spec version 1.0.0
...
Signed-off-by: Dan Williams <dcbw@redhat.com>
2021-02-11 23:27:08 -06:00
Bruce Ma
e2984e7840
host-local: return error if duplicate allocation is requested for a given ID
...
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-07-06 10:05:18 +08:00
Bruce Ma
eb1ff18c4c
host-local: add some testcases for allocation idempotency
...
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-07-06 09:39:56 +08:00
Bruce Ma
e8771b36a2
host-local: make allocation idempotent to multiple requests with same id
...
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-07-06 09:39:56 +08:00
Casey Callendrello
72f2a1ffd4
plugins: correctly output build version, cosmetic cleanups
...
Now that libcni has the ability to print a version message, plumb it
through correctly.
While we're at it,
- fix import paths
- run gofmt
- add some more comments to sample
- add container runtime swappability for release
2019-04-15 16:52:07 +02:00
Nguyen Quang Huy
4bca3e76bf
Fix redundant import alias
...
Because these package names are short and they are unique, it can not conflict. So the import aliases that can be omitted and we should remove them.
2019-02-20 16:58:45 +07:00
bingshen.wbs
59a746bd52
remove gateway check
...
Signed-off-by: bingshen.wbs <bingshen.wbs@alibaba-inc.com>
2018-11-29 12:59:38 +08:00
Michael Cambria
1e8f9525a6
Obtain ifname from CmdArgs and pass to backend Add ifname to second line of file tracking the IP address used by ContainerID
...
Update host-local tests to use ifname along with ContainerID
in store file
Signed-off-by: Michael Cambria <mcambria@redhat.com>
2018-10-09 13:13:36 -04:00
Neil Wilson
b2fc336833
plugins/host-local: ensure subnet is a network address
...
Allocation code assumes the specified subnet is a clean network address
prefix, so check that is the case and throw an error otherwise
Fixes #161
2018-06-18 10:13:34 +01:00
Casey Callendrello
aade7b93ee
build: some small improvements; bump to go1.10
...
- bump to go 1.10
- Add a linker tag with the build version
- Remove fastbuild, go builds are cached now
- Use better ginkgo suite names
2018-04-12 16:59:51 +02:00
Casey Callendrello
b03d23a4fa
ipam/host-local: Accept ip ranges as a runtime argument
...
This allows for the runtime to dynamically request IP ranges.
Fixes: #95
2017-12-11 13:51:01 +01:00
Casey Callendrello
27d027a6d3
ipam/host-local: support sets of disjoint ranges
...
In real-world address allocations, disjoint address ranges are common.
Therefore, the host-local allocator should support them.
This change still allows for multiple IPs in a single configuration, but
also allows for a "set of subnets."
Fixes: #45
2017-08-09 19:02:08 +02:00
Casey Callendrello
2e9e87732f
ipam/host-local: support multiple IP ranges
...
This change allows the host-local allocator to allocate multiple IPs.
This is intended to enable dual-stack, but is not limited to only two
subnets or separate address families.
2017-06-12 21:14:44 +02:00
Casey Callendrello
3c436520be
move most of cni/pkg to plugins/pkg: delete code staying in cni/pkg
...
This moves the following packages to this repository:
* ip
* ipam
* ns
* testutils
* utils
2017-05-23 16:12:49 +02:00
Dan Williams
d2792f264e
plugins: add plugins from containernetworking/cni
...
Plugins prepared from the containernetworking/cni repo as follows:
1) git reset --hard 1a9288c3c09cea4e580fdb1a636f1c5e185a391f
2) git remove everything not in plugins/
3) git remove plugins/test
4) git merge into containernetworking/plugins repo
5) adjust import paths for containernetworking/cni -> containernetworking/plugins
2017-05-14 23:12:45 -05:00
Dan Williams
21d96393ea
Merge pull request #391 from tangle329/master
...
Validate rangeStart and rangeEnd specified in conf
2017-04-24 22:00:07 -05:00
Tang Le
1b65890795
Validate rangeStart and rangeEnd specified in conf
...
Signed-off-by: Tang Le <tangle3@wanda.cn>
2017-03-10 12:51:05 +08:00
Gabe Rosenhouse
4ce9b019aa
Merge pull request #366 from ehazlett/ipam-host-local-initial-reserved-ip
...
Do not error if last reserved not found after initial creation
2017-03-06 07:13:06 -08:00
Evan Hazlett
474ba16901
do not error if last_reserved_ip is missing for host local ipam
...
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-03-02 13:59:21 -05:00
Tang Le
1003822e53
Check n.IPAM before use it in LoadIPAMConfig function
...
Signed-off-by: Tang Le <tangle3@wanda.cn>
2017-03-02 10:25:19 +08:00
Dan Williams
d5acb127b8
spec/plugins: return interface details and multiple IP addresses to runtime
...
Updates the spec and plugins to return an array of interfaces and IP details
to the runtime including:
- interface names and MAC addresses configured by the plugin
- whether the interfaces are sandboxed (container/VM) or host (bridge, veth, etc)
- multiple IP addresses configured by IPAM and which interface they
have been assigned to
Returning interface details is useful for runtimes, as well as allowing
more flexible chaining of CNI plugins themselves. For example, some
meta plugins may need to know the host-side interface to be able to
apply firewall or traffic shaping rules to the container.
2017-01-25 11:31:18 -06:00
Dan Williams
befb95977c
types: make Result an interface and move existing Result to separate package
2017-01-25 11:31:18 -06:00
Casey Callendrello
5cde14cd7b
ipam/host-local: add ResolvConf argument for DNS configuration
...
This adds the option `resolvConf` to the host-local IPAM configuration.
If specified, the plugin will try to parse the file as a resolv.conf(5)
type file and return it in the DNS response.
2017-01-11 18:48:35 +01:00
André Martins
f60111b093
ipam/host-local: Move allocator and config to backend
...
Signed-off-by: André Martins <aanm90@gmail.com>
2016-12-21 04:43:21 +00:00