diff options
author | Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp> | 2020-09-08 18:55:46 +0900 |
---|---|---|
committer | Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp> | 2020-09-09 15:45:56 +0900 |
commit | d34868a1366d49b56e8127973147c076c99a8a80 (patch) | |
tree | d92caee90929432336242d2b8ba44d27edd776ee /contrib/rootless-cni-infra/README.md | |
parent | 814784c5e6b9795d62a2c7624bc8884bd1011287 (diff) | |
download | podman-d34868a1366d49b56e8127973147c076c99a8a80.tar.gz podman-d34868a1366d49b56e8127973147c076c99a8a80.tar.bz2 podman-d34868a1366d49b56e8127973147c076c99a8a80.zip |
add contrib/rootless-cni-infra
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Diffstat (limited to 'contrib/rootless-cni-infra/README.md')
-rw-r--r-- | contrib/rootless-cni-infra/README.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/contrib/rootless-cni-infra/README.md b/contrib/rootless-cni-infra/README.md new file mode 100644 index 000000000..937e057fb --- /dev/null +++ b/contrib/rootless-cni-infra/README.md @@ -0,0 +1,22 @@ +# rootless-cni-infra + +Infra container for CNI-in-slirp4netns. + +## How it works + +When a CNI network is specified for `podman run` in rootless mode, Podman launches the `rootless-cni-infra` container to execute CNI plugins inside slirp4netns. + +The infra container is created per user, by executing an equivalent of: +`podman run -d --name rootless-cni-infra --pid=host --privileged -v $HOME/.config/cni/net.d:/etc/cni/net.d rootless-cni-infra`. +The infra container is automatically deleted when no CNI network is in use. + +Podman then allocates a CNI netns in the infra container, by executing an equivalent of: +`podman exec rootless-cni-infra rootless-cni-infra alloc $CONTAINER_ID $NETWORK_NAME $POD_NAME`. + +The allocated netns is deallocated when the container is being removed, by executing an equivalent of: +`podman exec rootless-cni-infra rootless-cni-infra dealloc $CONTAINER_ID $NETWORK_NAME`. + +## Directory layout + +* `/run/rootless-cni-infra/${CONTAINER_ID}/pid`: PID of the `sleep infinity` process that corresponds to the allocated netns +* `/run/rootless-cni-infra/${CONTAINER_ID}/attached/${NETWORK_NAME}`: CNI result |