19 Commits

Author SHA1 Message Date
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
Clint Armstrong
b9560fd5c1 macvlan: set mac address from CNI_ARGS
This change sets the mac address if specified during the creation of the
macvlan interface. This is superior to setting it via the tuning plugin
because this ensures the mac address is set before an IP is set,
allowing a container to get a reserved IP address from DHCP.

Related #450

Signed-off-by: Clint Armstrong <clint@clintarmstrong.net>
2020-05-20 13:58:38 -04:00
smarkm
0d0dcfc02f Cleanup netns after test suit
Signed-off-by: smarkm <smark@freecoop.net>
2019-08-22 08:10:35 +08:00
Casey Callendrello
a03e6b505e
Merge pull request #307 from SchSeba/l2-macvlan
Allow to configure empty ipam for macvlan
2019-05-08 17:27:52 +02:00
Sebastian Sch
af692de1b8 Allow to configure empty ipam for macvlan
This PR add the option to configure an empty ipam for the macvlan cni plugin.

When using the macvlan cni plugin with an empty ipam the requeted pod will get the macvlan interface but without any ip address.

One of the use cases for this feature is for projects that runs a dhcp server inside the pod like KubeVirt.
In KubeVirt we need to let the vm running inside the pod to make the dhcp request so it will be able to make a release an renew request when needed.
2019-05-01 20:29:22 +03:00
Tomofumi Hayashi
8c52f50849 macvlan: make master config as optional
To ease of config, make master config as optional parameter.
In default case, default route interface will be used for master.
2019-04-17 16:28:27 +09:00
Michael Cambria
74a2596573 Add check support for: bridge, ipvlan, macvlan, p2p, vlan and host-device main plugins
host-local and static ipam plugins
  tuning, bandwidth and portmap meta plugins

  Utility functions created for common PrevResult checking

  Fix windows build
2019-04-03 13:08:07 -04:00
Dan Williams
731298003c plugins/testutils: pass CNI_CONTAINERID to plugins in testcases
Recent CNI specification changes require the container ID on ADD/DEL,
which the testcases were not providing.  Fix that up so things work
when this repo gets CNI revendored.
2018-04-26 11:24:30 -05:00
Casey Callendrello
a0eac8d7d9 pkg/ns: remove namespace creation (and move to testutils)
Namespace creation had an unergonomic interface and isn't used, except
for testing code. Remove it; downstream users should really be creating
their own namespaces
2018-04-03 18:56:25 +02:00
Casey Callendrello
e76165b44f ptp, macvlan: don't change mac address; send gratuitous arp 2017-06-07 16:08:41 +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
9445711fa5 spec/plugins: fix 'ip'->'ips' in the spec, bump to 0.3.1 2017-04-05 12:46:24 -05:00
Tom Denham
13824487c6
plugins/*: Don't error if the device doesn't exist
I wasn't able to test or update the dhcp plugin but from a code read it
should be fine. All the other plugins are tested and fixed
2017-03-22 08:52:29 -07: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
cb4cd0e12c testutils: pass netConf in for version operations; pass raw result out for tests 2017-01-25 11:31:18 -06:00
Gabe Rosenhouse
0135e2751e versioning: ipam config is not versioned 2016-09-19 13:25:28 -07:00
Gabe Rosenhouse
fd150a4c97 skel: Plugins require a cniVersion in the NetConf 2016-09-18 21:30:57 -07:00
Stefan Junker
5a52316ab5 plugins/{bridge,macvlan} test: ensure hardware addr
* bridge: Test the following interface's hardware address for the CNI specific
prefix:
  - bridge with IP address
  - container veth
* plugins/macvlan test: ensure hardware addr
2016-07-22 15:40:00 -07:00
Dan Williams
552dc43168 macvlan: add e2e testing 2016-05-20 17:10:25 -05:00