feat(network): add support for static IPv6 assignment#4598
Draft
frits-v wants to merge 1 commit intocontainerd:mainfrom
Draft
feat(network): add support for static IPv6 assignment#4598frits-v wants to merge 1 commit intocontainerd:mainfrom
frits-v wants to merge 1 commit intocontainerd:mainfrom
Conversation
7c24e65 to
b3cb854
Compare
38ed40e to
e3babdc
Compare
This commit introduces end-to-end support for assigning static IPv6 addresses to containers, both via the command line and through nerdctl compose. Key changes: - A new `--ip6` flag is added to `nerdctl run` to allow direct assignment of a static IPv6 address. - The CNI bridge configuration for IPv6 networks is now updated to declare the `"ips"` capability. This is required by libcni to process static IP capability arguments. - To prevent regressions in downstream CNI plugins (like dnsname and firewall), the `"dns"` and `"portMappings"` capabilities are also explicitly declared for IPv6 networks. This avoids issues where implicit capabilities were being dropped. - The compose parser now recognizes the `ipv6_address` field within a service's network configuration and translates it to the `--ip6` flag during container creation. - Adds comprehensive integration tests for static IPv4, IPv6, and dual-stack IP assignment, as well as unit tests for compose file parsing, to validate the new functionality and prevent regressions. Fixes containerd#4597 Signed-off-by: Frits <4488681+frits-v@users.noreply.github.com>
e3babdc to
e790552
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces end-to-end support for assigning static IPv6 addresses to containers, both via the command line and through
nerdctl compose.Key changes:
A new
--ip6flag is added tonerdctl runto allow direct assignment of a static IPv6 address.The CNI bridge configuration for IPv6 networks is now updated to declare the
"ips"capability. This is required by libcni to process static IP capability arguments.To prevent regressions in downstream CNI plugins (like dnsname and firewall), the
"dns"and"portMappings"capabilities are also explicitly declared for IPv6 networks. This avoids issues where implicit capabilities were being dropped.The compose parser now recognizes the
ipv6_addressfield within a service's network configuration and translates it to the--ip6flag during container creation.Adds comprehensive integration tests for static IPv4, IPv6, and dual-stack IP assignment, as well as unit tests for compose file parsing, to validate the new functionality and prevent regressions.
fixes #4597