cni.git
10 years agoMerge pull request #55 from jonboulle/travis
Jonathan Boulle [Mon, 7 Sep 2015 23:28:35 +0000 (16:28 -0700)]
Merge pull request #55 from jonboulle/travis

*: add basic test script + travis hook

10 years ago*: add basic test script + travis hook
Jonathan Boulle [Mon, 7 Sep 2015 23:15:18 +0000 (16:15 -0700)]
*: add basic test script + travis hook

Adds a simple test script, mostly to perform gofmt and govet checking;
currently tests only exist for the DHCP plugin.

10 years agoMerge pull request #54 from jonboulle/master
Stefan Junker [Mon, 7 Sep 2015 22:49:28 +0000 (00:49 +0200)]
Merge pull request #54 from jonboulle/master

plugin/ipam: fix typo in error message

10 years agoplugin/ipam: fix typo in error message
Jonathan Boulle [Mon, 7 Sep 2015 22:43:34 +0000 (15:43 -0700)]
plugin/ipam: fix typo in error message

10 years agoMerge pull request #51 from steveeJ/plugins-args
Stefan Junker [Sat, 5 Sep 2015 17:00:53 +0000 (19:00 +0200)]
Merge pull request #51 from steveeJ/plugins-args

CNI_ARGS: use ';' to split args as documented

10 years agoCNI_ARGS: use ';' to split args as documented
Stefan Junker [Sat, 5 Sep 2015 16:58:58 +0000 (18:58 +0200)]
CNI_ARGS: use ';' to split args as documented

10 years agoMerge pull request #42 from steveeJ/plugins-args
Stefan Junker [Thu, 3 Sep 2015 23:42:11 +0000 (01:42 +0200)]
Merge pull request #42 from steveeJ/plugins-args

host-local: allow ip request via CNI_ARGS

10 years agohost-local: allow ip request via CNI_ARGS
Stefan Junker [Sun, 16 Aug 2015 00:30:04 +0000 (02:30 +0200)]
host-local: allow ip request via CNI_ARGS

A specific IP can now be requested via the environment variable CNI_ARGS, e.g.
`CNI_ARGS=ip=1.2.3.4`.
The plugin will try to reserve the specified IP.
If this is not successful the execution will fail.

10 years agoMerge pull request #49 from eyakubovich/dco
Eugene Yakubovich [Wed, 2 Sep 2015 18:01:42 +0000 (11:01 -0700)]
Merge pull request #49 from eyakubovich/dco

Add DCO and CONTRIBUTING.md

10 years agoAdd DCO and CONTRIBUTING.md
Eugene Yakubovich [Wed, 2 Sep 2015 18:00:27 +0000 (11:00 -0700)]
Add DCO and CONTRIBUTING.md

10 years agoMerge pull request #43 from alexwlchan/master
Jonathan Boulle [Thu, 20 Aug 2015 16:17:56 +0000 (09:17 -0700)]
Merge pull request #43 from alexwlchan/master

Fix a few spelling mistakes in the docs

10 years agoFix a few spelling mistakes in the docs
Alex Chan [Thu, 20 Aug 2015 15:41:25 +0000 (16:41 +0100)]
Fix a few spelling mistakes in the docs

10 years agoMerge pull request #41 from eyakubovich/flannel-route
Eugene Yakubovich [Sat, 15 Aug 2015 23:28:09 +0000 (16:28 -0700)]
Merge pull request #41 from eyakubovich/flannel-route

flannel: set up route for the entire flannel network

10 years agoflannel: set up route for the entire flannel network
Eugene Yakubovich [Mon, 10 Aug 2015 21:13:06 +0000 (14:13 -0700)]
flannel: set up route for the entire flannel network

Without it, packets leave via default route iface
and come back via interface added by flannel plugin.
If rp_filter=1, the packets are dropped.

10 years agoMerge pull request #37 from steveeJ/fix-docs
Jonathan Boulle [Mon, 3 Aug 2015 22:12:07 +0000 (15:12 -0700)]
Merge pull request #37 from steveeJ/fix-docs

host-local: fix routes in README examples

10 years agohost-local: fix routes in README examples
Stefan Junker [Mon, 3 Aug 2015 13:37:14 +0000 (15:37 +0200)]
host-local: fix routes in README examples

10 years agoMerge pull request #34 from eyakubovich/document-plugins
Eugene Yakubovich [Wed, 22 Jul 2015 16:02:39 +0000 (09:02 -0700)]
Merge pull request #34 from eyakubovich/document-plugins

Document the plugins

10 years agoMerge pull request #33 from eyakubovich/veth-to-ptp-rename
Eugene Yakubovich [Wed, 22 Jul 2015 00:20:37 +0000 (17:20 -0700)]
Merge pull request #33 from eyakubovich/veth-to-ptp-rename

Rename veth plugin to ptp and add docs.

10 years agoRename veth plugin to ptp and add docs.
Eugene Yakubovich [Fri, 10 Jul 2015 19:18:25 +0000 (12:18 -0700)]
Rename veth plugin to ptp and add docs.

ptp (point-to-point) better describes the nature of the plugin
as veth pairs are also used by the bridge plugin.

10 years agoDocument the plugins
Eugene Yakubovich [Fri, 10 Jul 2015 19:48:36 +0000 (12:48 -0700)]
Document the plugins

Adds a .md file to the Documentation/ folder for each plugin.

Fixes #16

10 years agoMerge pull request #35 from eyakubovich/ip_forward
Eugene Yakubovich [Wed, 22 Jul 2015 00:12:04 +0000 (17:12 -0700)]
Merge pull request #35 from eyakubovich/ip_forward

enable net.ipv4.ip_forward in plugins that need it

10 years agoMerge pull request #29 from eyakubovich/spec-fmt-fixes
Eugene Yakubovich [Fri, 17 Jul 2015 03:18:33 +0000 (20:18 -0700)]
Merge pull request #29 from eyakubovich/spec-fmt-fixes

spec: fix fmt issues and example JSON

10 years agoMerge pull request #32 from eyakubovich/ipvlan-fix
Eugene Yakubovich [Wed, 15 Jul 2015 17:25:07 +0000 (10:25 -0700)]
Merge pull request #32 from eyakubovich/ipvlan-fix

ipvlan: wrong name was used during link creation

10 years agoenable net.ipv4.ip_forward in plugins that need it
Eugene Yakubovich [Mon, 13 Jul 2015 22:41:02 +0000 (15:41 -0700)]
enable net.ipv4.ip_forward in plugins that need it

10 years agoipvlan: wrong name was used during link creation
Eugene Yakubovich [Fri, 10 Jul 2015 21:02:32 +0000 (14:02 -0700)]
ipvlan: wrong name was used during link creation

Instead of temp (random) name, the final name (e.g. eth0)
was used during link creation. This would collide on hosts
that already had the an interface with such a name.

10 years agoMerge pull request #30 from zenlinTechnofreak/master
Jonathan Boulle [Wed, 8 Jul 2015 19:18:54 +0000 (12:18 -0700)]
Merge pull request #30 from zenlinTechnofreak/master

Fix environment bug,version of golang should be 1.4+, add reminding i…

10 years agoFix environment bug,version of golang should be 1.4+, add reminding in Readme.md
zenlin [Tue, 7 Jul 2015 05:08:32 +0000 (13:08 +0800)]
Fix environment bug,version of golang should be 1.4+, add reminding in Readme.md

10 years agospec: fix fmt issues and example JSON
Eugene Yakubovich [Tue, 7 Jul 2015 00:00:57 +0000 (17:00 -0700)]
spec: fix fmt issues and example JSON

10 years agoMerge pull request #22 from eyakubovich/netns-err
Eugene Yakubovich [Mon, 15 Jun 2015 23:08:01 +0000 (16:08 -0700)]
Merge pull request #22 from eyakubovich/netns-err

dhcp: don't swallow err from netns switch

10 years agodhcp: don't swallow err from netns switch
Eugene Yakubovich [Mon, 15 Jun 2015 18:32:33 +0000 (11:32 -0700)]
dhcp: don't swallow err from netns switch

10 years agoMerge pull request #24 from eyakubovich/dhcp-abs-path
Eugene Yakubovich [Mon, 15 Jun 2015 19:46:40 +0000 (12:46 -0700)]
Merge pull request #24 from eyakubovich/dhcp-abs-path

dhcp: make netns path absolute prior to RPC

10 years agoMerge pull request #25 from eyakubovich/dhcp-timeout
Eugene Yakubovich [Mon, 15 Jun 2015 19:45:09 +0000 (12:45 -0700)]
Merge pull request #25 from eyakubovich/dhcp-timeout

dhcp: decrease read timeout and clamp backoff

10 years agodhcp: make netns path absolute prior to RPC
Eugene Yakubovich [Mon, 15 Jun 2015 19:31:07 +0000 (12:31 -0700)]
dhcp: make netns path absolute prior to RPC

The dhcp daemon may be running with a different cwd
and so the netns paths need to be absolute. This patch
also refactors the code to pull out the common, RPC
parts, out into a separate function.

10 years agodhcp: decrease read timeout and clamp backoff
Eugene Yakubovich [Mon, 15 Jun 2015 19:40:34 +0000 (12:40 -0700)]
dhcp: decrease read timeout and clamp backoff

10 years agoMerge pull request #21 from eyakubovich/no-path-rewrite
Eugene Yakubovich [Fri, 12 Jun 2015 23:29:58 +0000 (16:29 -0700)]
Merge pull request #21 from eyakubovich/no-path-rewrite

No more path rewriting

10 years agoNo more path rewriting
Eugene Yakubovich [Fri, 12 Jun 2015 19:15:11 +0000 (12:15 -0700)]
No more path rewriting

Path rewriting causes too many problems when vendoring
vendored code. When CNI code is vendored into rkt,
godep has problems code already vendored by CNI.

10 years agoMerge pull request #20 from eyakubovich/flannel
Eugene Yakubovich [Thu, 11 Jun 2015 22:39:53 +0000 (15:39 -0700)]
Merge pull request #20 from eyakubovich/flannel

add flannel plugin

10 years agoadd flannel plugin
Eugene Yakubovich [Mon, 1 Jun 2015 23:58:43 +0000 (16:58 -0700)]
add flannel plugin

This introduces a notion of a "meta" plugin. A meta plugin
is one that delegates the actual work of setting up the interface
to the main plugin. The meta plugin is used to select and dynamically
configure the main plugin. The sequence of events, is as follows:

Given netconf like:

    {
"name": "mynet",
"type": "flannel",
"delegate": {
    "type": "bridge"
}
    }

flannel fills in values like "mtu", "ipam.subnet" and delegates to
"bridge" main plugin. "bridge" plugin will operate as usual, calling
into ipam module for IP assignment.

Delegate dictionary should not contain "name" field as it will be
filled in by the flannel plugin.

10 years agoMerge pull request #19 from eyakubovich/err-handling
Jonathan Boulle [Thu, 11 Jun 2015 17:37:37 +0000 (10:37 -0700)]
Merge pull request #19 from eyakubovich/err-handling

Propagate json error object to the caller

10 years agoPropagate json error object to the caller
Eugene Yakubovich [Tue, 2 Jun 2015 00:34:00 +0000 (17:34 -0700)]
Propagate json error object to the caller

When plugin errors out, it prints out a JSON object to stdout
describing the failure. This object needs to be propagated out
through the plugins and to the container runtime. This change
also adds Print method to both the result and error structs
for easy serialization to stdout.

10 years agoMerge pull request #13 from eyakubovich/dhcp
Eugene Yakubovich [Fri, 22 May 2015 01:18:58 +0000 (18:18 -0700)]
Merge pull request #13 from eyakubovich/dhcp

DHCP plugin

10 years agoadd DHCP IPAM plugin
Eugene Yakubovich [Tue, 19 May 2015 19:02:41 +0000 (12:02 -0700)]
add DHCP IPAM plugin

The plugin binary actually functions in two modes. The first mode
is a regular CNI plugin. The second mode (when stared with "daemon" arg)
runs a DHCP client daemon. When executed as a CNI plugin, it issues
an RPC request to the daemon for actual processing. The daemon is
required since a DHCP lease needs to be maintained by periodically
renewing it. One instance of the daemon can server arbitrary number
of containers/leases.

10 years agomacvlan and ipvlan: rename tmp iface name prior to calling IPAM
Eugene Yakubovich [Tue, 19 May 2015 18:55:06 +0000 (11:55 -0700)]
macvlan and ipvlan: rename tmp iface name prior to calling IPAM

10 years agofix bridge to call IPAM after link creation
Eugene Yakubovich [Tue, 19 May 2015 18:53:41 +0000 (11:53 -0700)]
fix bridge to call IPAM after link creation

10 years agovendoring sys/unix, go-systemd, dhcp libraries
Eugene Yakubovich [Tue, 19 May 2015 18:49:13 +0000 (11:49 -0700)]
vendoring sys/unix, go-systemd, dhcp libraries

10 years agoMerge pull request #12 from eyakubovich/git-ignore
Eugene Yakubovich [Mon, 11 May 2015 19:18:08 +0000 (12:18 -0700)]
Merge pull request #12 from eyakubovich/git-ignore

adding .gitignore

10 years agoadding .gitignore
Eugene Yakubovich [Mon, 11 May 2015 18:12:24 +0000 (11:12 -0700)]
adding .gitignore

10 years agoMerge pull request #9 from eyakubovich/errors
Eugene Yakubovich [Fri, 8 May 2015 22:08:03 +0000 (15:08 -0700)]
Merge pull request #9 from eyakubovich/errors

report errors via JSON

10 years agoreport errors via JSON
Eugene Yakubovich [Thu, 30 Apr 2015 00:52:41 +0000 (17:52 -0700)]
report errors via JSON

This reflects the latest SPEC draft.

10 years agoMerge pull request #11 from eyakubovich/nspath
Eugene Yakubovich [Fri, 8 May 2015 22:02:56 +0000 (15:02 -0700)]
Merge pull request #11 from eyakubovich/nspath

Do not use netns as ID or for entropy

10 years agoDo not use netns as ID or for entropy
Eugene Yakubovich [Tue, 5 May 2015 20:35:20 +0000 (13:35 -0700)]
Do not use netns as ID or for entropy

ContainerID is now required so use that
or generate random bytes.

Fixes #5

10 years agoMerge pull request #2 from jonboulle/master
Eugene Yakubovich [Tue, 5 May 2015 21:41:38 +0000 (14:41 -0700)]
Merge pull request #2 from jonboulle/master

*: first cut at SPEC and README

10 years agoMerge pull request #8 from steveeJ/ipvlan
Eugene Yakubovich [Tue, 5 May 2015 20:35:11 +0000 (13:35 -0700)]
Merge pull request #8 from steveeJ/ipvlan

plugins: add ipvlan main plugin

10 years agoplugins: add ipvlan main plugin
Stefan Junker [Sun, 3 May 2015 06:18:03 +0000 (23:18 -0700)]
plugins: add ipvlan main plugin

Add the ipvlan main plugin which is heavily based on the macvlan plugin.
Availabile modes for this plugin are l2 and l3, wheres l2 has the higher
compatibility due to support for multicast and broadcasts. L2 has therefore been
chosen as the default mode.
See the official docs at
https://www.kernel.org/doc/Documentation/networking/ipvlan.txt
for more information.

Fixes #6.

10 years agospec: incorporate feedback
Eugene Yakubovich [Wed, 29 Apr 2015 03:50:02 +0000 (20:50 -0700)]
spec: incorporate feedback

10 years agoSPEC: wording tweak
Jonathan Boulle [Mon, 20 Apr 2015 19:21:55 +0000 (12:21 -0700)]
SPEC: wording tweak

10 years agowording fixes
Eugene Yakubovich [Mon, 20 Apr 2015 19:12:05 +0000 (12:12 -0700)]
wording fixes

10 years ago*: first cut at SPEC and README
Jonathan Boulle [Thu, 16 Apr 2015 00:07:46 +0000 (17:07 -0700)]
*: first cut at SPEC and README

10 years agoAdd plugin code
Eugene Yakubovich [Wed, 15 Apr 2015 22:35:02 +0000 (15:35 -0700)]
Add plugin code

This adds basic plugins.
"main" types: veth, bridge, macvlan
"ipam" type: host-local

The code has been ported over from github.com/coreos/rkt project
and adapted to fit the CNI spec.

10 years agoInitial commit
Jonathan Boulle [Sun, 5 Apr 2015 03:35:49 +0000 (20:35 -0700)]
Initial commit