v0.4.1
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE1MTdYA1m9lqO/FEeGPNoXAAiv/MFAlsauhoACgkQGPNoXAAi
v/PCTg/9HAlqJCf+LX/PenAXAbWf5ApCeGBUyqybXx0byQAwvcEw5Hsj+viZ/SBI
7ArVQJkoJIK/xniMXtFZL084yIGv5k1+hjLfZJb1q1ufYTrmwrFqAfO8DN7FeWnH
/QvqHJpypuJwsfBj3+oMkVhm+etu54r1L+T602nTWbCmNAWGQ3RAt2UVrp9/4MMB
TJ3gaLZ0cTbCjhujGG5znw+cbwztIfw8OpalQdPmF6Rf0+4xeFybDLT52L70GdJw
M87bd6KbeviiCipK3zpmvBNIXnAEr/V0DEWSLLtUivWkrR2XVYO2dXYZ44pPX7cJ
T8LnI0HpvaFyj9Qs8/5/xx8xEta1RaHQHQs8AfXimOuO23Ax5O43oN7ZNMAgh/QW
f0QJmRnXkGo/ixIqMLCG52OXw5fLMT495csz2LN6xI5+pXVLJorIF93gSY4mKPH3
oBWeNQkWOMES3BXI7TSsfdjr1d+ePrKGW2UcfCVUsdOClCPAJnHErCGafCPeRkoZ
Pn6AbnuojDmOkH17DLslMUu2aFE22WUTgK9TAeLxZJT8u+dY1jG2IMpUHCRSF8pX
lyqZEdoQjBkzIQRsJ42ujOYGbRMS+DMK1BfvXQkds4eDTpSk/FmUKrCtwpdVRixF
9YtN8MYr2sa0nah+UmMbiQ7aHdwUHsK5nOQASNpALftQYLnPV/8=
=eAyF
-----END PGP SIGNATURE-----
Bump version to v0.4.1

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2 files changed
tree: 37e0dd035b4d487a15b339672ffff649d4c62ec5
  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.1

 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