Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cniprovider: support rootlesskit --detach-netns (RootlessKit v2) #4546

Merged
merged 2 commits into from
Jan 18, 2024

Conversation

AkihiroSuda
Copy link
Member

@AkihiroSuda AkihiroSuda commented Jan 11, 2024

RootlessKit v2 added the support for --detach-netns mode.

This leaves containerd and buildkitd in the host netns so as to:

  • Eliminate the slirp overhead for pull/push
  • Allow accessing the real localhost registry.

Since rootless users has no CAP_NET_ADMIN in the host netns, CNI plugins have to be executed in the "detached" netns ($ROOTLESSKIT_STATE_DIR/netns) that is associated with slirp.

ref:

@AkihiroSuda
Copy link
Member Author

Rebased

@AkihiroSuda
Copy link
Member Author

@tonistiigi Can we have a new beta after merging this?

RootlessKit v2 added the support for `--detach-netns` mode.

This leaves containerd and buildkitd in the host netns so as to:
- Eliminate the slirp overhead for pull/push
- Allow accessing the real localhost registry.

Since rootless users has no `CAP_NET_ADMIN` in the host netns,
CNI plugins have to be executed in the "detached" netns (`$ROOTLESSKIT_STATE_DIR/netns`)
that is associated with slirp.

ref:
- rootless-containers/rootlesskit PR 379
- containerd/nerdctl PR 2723

Signed-off-by: Akihiro Suda <[email protected]>
@AkihiroSuda
Copy link
Member Author

Rebased

@tonistiigi tonistiigi merged commit 016b559 into moby:master Jan 18, 2024
64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rootless rootless mode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants