v0.4.3
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE1MTdYA1m9lqO/FEeGPNoXAAiv/MFAltKJHMACgkQGPNoXAAi
v/POxBAAgHlvBLYtUxTJiSwyUUQZ45v4q6qzSQijZ3EaTtQ5ehCNqGHAkFNisoPh
Bsfu3matcaarANzUSbx7K08DlD4vaVTIh2ixO6bTYJL1Ttxe8hACviraij1xR7IA
Jn4KuAvFRRCiiTuyOUZN6mt3Z0XWJOlgS5bYudatPcvFPqF5iSS+XTYhyS1BAmLC
LtZdrkx0R8RxiNBhDWdqHQS0mN9f4CeDd20V0Ylg/aCWea+Q3ed73ng23vXuuZC/
bFjZyjI0dqaQVu3oO0nZFYo4Vk5zgM85cvDHm5aLX/kCrF81Hm7wCnXYijR9WyGI
3JNDDEYM1vrwrKdimd4AG5IkWOyH/wLtSrkdXk8jq1+aE16gfEIEF33bDXRBkx1B
z3ULsCMyANg343GJwcmj4mmzN3n9MDxZipo9UQFxAeOaqvDB48k5jSdagb4zJH5B
hkdYrOsI4ihZ5w9wwvKz1nkAHy27aeSgxROZgsUq7eEtQxPtCxWkkE2n/rEeDIPa
JADjZd/tBx8mpaYMBaxclCIHJU62BBizaLktCX0sc7mKQJmDBfbAQl990+kUJLOJ
x7Fk+OckL2KRbepZwZttASJxSWVBWxntjUaQ3EjRE5MHeg6/28HnJUoagb96HRWm
1gURYsBxWjZFIr2xR0oolBNf8Gtn4zsZuohYRI/mZQWNNLzvmSA=
=CUqB
-----END PGP SIGNATURE-----
Bump version to v0.4.3

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2 files changed
tree: 97f6f3515d063eff82a49e5aedfc64f505aeda94
  1. .gitignore
  2. .travis.yml
  3. Dockerfile
  4. Gopkg.lock
  5. Gopkg.toml
  6. LICENSE
  7. Makefile
  8. README.md
  9. VERSION.txt
  10. bridge/
  11. main.go
  12. netutils/
  13. network/
  14. vendor/
  15. version/
README.md

netns

Travis CI

Runc hook for setting up default bridge networking.

Installation

Binaries

Via Go

$ go get github.com/genuinetools/netns

Usage

$ netns --help
            _
 _ __   ___| |_ _ __  ___
| '_ \ / _ \ __| '_ \/ __|
| | | |  __/ |_| | | \__ \
|_| |_|\___|\__|_| |_|___/

 Runc hook for setting up default bridge networking.
 Version: v0.4.3

 Netns provides the following commands. Usage format:

    netns [-flag value] [-flag value] command

  Where command is one of:

    createbr, delbr, [ls|list], delete

  If command is blank (e.g. when called via a hook) it
  will create a network endpoint in the expected net
  namespace details for that PID.

  -bridge string
        name for bridge (default "netns0")
  -d    run in debug mode
  -iface string
        name of interface in the namespace (default "eth0")
  -ip string
        ip address for bridge (default "172.19.0.1/16")
  -ipfile string
        file in which to save the containers ip address (default ".ip")
  -mtu int
        mtu for bridge (default 1500)
  -state-dir string
        directory for saving state, used for ip allocation (default "/run/github.com/genuinetools/netns")
  -v    print version and exit (shorthand)
  -version
        print version and exit

Place this in the Hooks.Prestart field of your runc config.

{
    ...
    "hooks": {
        "prestart": [
            {
                "path": "/path/to/netns"
            }
        ]
    },
    ...
}

List network namespaces

$ sudo netns ls
IP                  LOCAL VETH          PID                 STATUS
172.19.0.3          netnsv0-21635       21635               running
172.19.0.4          netnsv0-21835       21835               running
172.19.0.5          netnsv0-22094       22094               running
172.19.0.6          netnsv0-25996       25996               running