rootless: enable IPv6 in RootlessKit network namespace#5055
rootless: enable IPv6 in RootlessKit network namespace#5055Akshitguptaa wants to merge 6 commits into
Conversation
Signed-off-by: akshitguptaa <akshitguptaa29@gmail.com>
| } | ||
|
|
||
| // RootlessKitIPv6Enabled reports whether the running RootlessKit parent process was launched with --ipv6. | ||
| func RootlessKitIPv6Enabled() bool { |
There was a problem hiding this comment.
There was a problem hiding this comment.
Maybe you should rather add IPv6 bool in https://github.com/rootless-containers/rootlesskit/blob/v3.0.1/pkg/api/api.go#L22
There was a problem hiding this comment.
Thanks that is a better approach
I've opened rootless-containers/rootlesskit#607 to add the IPv6 boolean to NetworkDriverInfo
could you take a look at that pr when you have a chance?
once that is merged, I can update this logic as well and we can get this PR merged as well.
| * `CONTAINERD_ROOTLESS_ROOTLESSKIT_IPV6=(true|false)`: whether to enable IPv6 inside the RootlessKit network namespace. | ||
| Defaults to "false". After enabling this, create IPv6-capable CNI networks with | ||
| `nerdctl network create --ipv6 --subnet <v6-subnet>` as usual. Published ports over IPv6 are | ||
| supported with `--port-driver=builtin` (the default). `--port-driver=slirp4netns` does not yet |
There was a problem hiding this comment.
Does it work with pasta too? (--net=pasta --port-driver=implicit)
There was a problem hiding this comment.
I tested this with pasta and --port-driver=implicit, but it currently fails during port exposure with no PortDriver is available. It looks like nerdctl's rootless-port hook expects the PortDriver API to be active when -p is passed, which isn't the case under implicit.
I've updated the docs in 5e18ed0 to explicitly note that pasta isn't supported for IPv6 port forwarding yet.
| } | ||
|
|
||
| // RootlessKitIPv6Enabled reports whether the running RootlessKit parent process was launched with --ipv6. | ||
| func RootlessKitIPv6Enabled() bool { |
There was a problem hiding this comment.
Consider moving this to testutil pkg
Co-authored-by: Akihiro Suda <suda.kyoto@gmail.com> Signed-off-by: Akshit <akshitguptaa29@gmail.com>
Signed-off-by: akshitguptaa <akshitguptaa29@gmail.com>
Signed-off-by: akshitguptaa <akshitguptaa29@gmail.com>
Signed-off-by: akshitguptaa <akshitguptaa29@gmail.com>
Adds CONTAINERD_ROOTLESS_ROOTLESSKIT_IPV6=(true|false) to enable IPv6 inside the
RootlessKit network namespace, wired through to
rootlesskit --ipv6.Scope: covers --port-driver=builtin (the default). --port-driver=slirp4netns
does not yet support IPv6 port forwarding upstream
(rootless-containers/slirp4netns#276 is still open), so that path remains
unsupported here.
Fixes #2608