-
Notifications
You must be signed in to change notification settings - Fork 553
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The proposed "netdevices" field provides a declarative way to specify which host network devices should be moved into a container's network namespace. This approach is similar than the existing "devices" field used for block devices but uses a dictionary keyed by the interface name instead. The proposed scheme is based on the existing representation of network device by the `struct net_device` https://docs.kernel.org/networking/netdevices.html. This proposal focuses solely on moving existing network devices into the container namespace. It does not cover the complexities of network configuration or network interface creation, emphasizing the separation of device management and network configuration. Signed-off-by: Antonio Ojea <[email protected]>
- Loading branch information
Showing
10 changed files
with
222 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"ociVersion": "1.0.0", | ||
"root": { | ||
"path": "rootfs" | ||
}, | ||
"linux": { | ||
"netDevices": { | ||
"eth0": { | ||
"name": "container_eth0", | ||
"mtu": "not_an_int" | ||
} | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"ociVersion": "1.0.0", | ||
"root": { | ||
"path": "rootfs" | ||
}, | ||
"linux": { | ||
"netDevices": { | ||
"eth0": { | ||
"name": "container_eth0" | ||
}, | ||
"ens4": { | ||
"addresses": [ | ||
"10.0.0.10/24" | ||
], | ||
"hardwareAddress": "32:ba:1c:b1:eb:63", | ||
"mtu": 9000 | ||
}, | ||
"ens5": { | ||
"addresses": [ | ||
"2001:db8:1:2::4/64" | ||
], | ||
"mtu": 1500 | ||
}, | ||
"ens6": { | ||
"addresses": [ | ||
"10.0.0.10/24", | ||
"2001:db8:1:2::4/64" | ||
], | ||
"mtu": 1500 | ||
}, | ||
"ens7": { | ||
"addresses": [ | ||
"10.0.0.10/24", | ||
"2001:db8:1:2::4/64", | ||
"fd00:1::af/48" | ||
], | ||
"mtu": 1500 | ||
} | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,6 +182,9 @@ | |
}, | ||
"selinux": { | ||
"enabled": true | ||
}, | ||
"netDevices": { | ||
"enabled": true | ||
} | ||
}, | ||
"annotations": { | ||
|
This file contains 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
This file contains 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