Skip to content

Commit 0724f85

Browse files
authored
Merge pull request #59526 from kquinn1204/TELCODOCS-994
Telcodocs 994 Documenting TAP device plugin
2 parents d56b81c + 1a02c7e commit 0724f85

File tree

3 files changed

+98
-1
lines changed

3 files changed

+98
-1
lines changed

modules/nw-multus-tap-object.adoc

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/multiple_networks/configuring-additional-network.adoc
4+
5+
:_content-type: REFERENCE
6+
[id="nw-multus-tap-object_{context}"]
7+
= Configuration for a TAP additional network
8+
9+
The following object describes the configuration parameters for the TAP CNI
10+
plugin:
11+
12+
.TAP CNI plugin JSON configuration object
13+
[cols=".^2,.^2,.^6",options="header"]
14+
|====
15+
|Field|Type|Description
16+
17+
|`cniVersion`
18+
|`string`
19+
|The CNI specification version. The `0.3.1` value is required.
20+
21+
|`name`
22+
|`string`
23+
|The value for the `name` parameter you provided previously for the CNO configuration.
24+
25+
|`type`
26+
|`string`
27+
|The name of the CNI plugin to configure: `tap`.
28+
29+
|`mac`
30+
|`string`
31+
|Optional: Request the specified MAC address for the interface.
32+
33+
|`mtu`
34+
|`integer`
35+
|Optional: Set the maximum transmission unit (MTU) to the specified value. The default value is automatically set by the kernel.
36+
37+
|`selinuxcontext`
38+
|`string`
39+
a|Optional: The SELinux context to associate with the tap device.
40+
41+
[NOTE]
42+
====
43+
The value `system_u:system_r:container_t:s0` is required for {product-title}.
44+
====
45+
46+
|`multiQueue`
47+
|`boolean`
48+
|Optional: Set to `true` to enable multi-queue.
49+
50+
|`owner`
51+
|`integer`
52+
|Optional: The user owning the tap device.
53+
54+
|`group`
55+
|`integer`
56+
|Optional: The group owning the tap device.
57+
58+
|`bridge`
59+
|`string`
60+
|Optional: Set the tap device as a port of an already existing bridge.
61+
|====
62+
63+
[id="nw-multus-tap-config-example_{context}"]
64+
== Tap configuration example
65+
66+
The following example configures an additional network named `mynet`:
67+
68+
[source,json]
69+
----
70+
{
71+
"name": "mynet",
72+
"cniVersion": "0.3.1",
73+
"type": "tap",
74+
"mac": "00:11:22:33:44:55",
75+
"mtu": 1500,
76+
"selinuxcontext": "system_u:system_r:container_t:s0",
77+
"multiQueue": true,
78+
"owner": 0,
79+
"group": 0
80+
"bridge": "br1"
81+
}
82+
----
83+
84+
[NOTE]
85+
====
86+
To create the tap device with the `container_t` SELinux context, enable the `container_use_devices` boolean on the host by using the Machine Config Operator (MCO).
87+
====

networking/multiple_networks/configuring-additional-network.adoc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ As a cluster administrator, you can configure an additional network for your clu
1313
* xref:../../networking/multiple_networks/configuring-additional-network.adoc#nw-multus-vlan-object_configuring-additional-network[VLAN]
1414
* xref:../../networking/multiple_networks/configuring-additional-network.adoc#nw-multus-ipvlan-object_configuring-additional-network[IPVLAN]
1515
* xref:../../networking/multiple_networks/configuring-additional-network.adoc#nw-multus-macvlan-object_configuring-additional-network[MACVLAN]
16+
* xref:../../networking/multiple_networks/configuring-additional-network.adoc#nw-multus-tap-object_configuring-additional-network[TAP]
1617
* xref:../../networking/multiple_networks/configuring-additional-network.adoc#configuration-ovnk-additional-networks_configuring-additional-network[OVN-Kubernetes]
1718
1819
[id="{context}_approaches-managing-additional-network"]
@@ -131,6 +132,13 @@ include::modules/nw-multus-host-device-object.adoc[leveloffset=+2]
131132
include::modules/nw-multus-vlan-object.adoc[leveloffset=+2]
132133
include::modules/nw-multus-ipvlan-object.adoc[leveloffset=+2]
133134
include::modules/nw-multus-macvlan-object.adoc[leveloffset=+2]
135+
include::modules/nw-multus-tap-object.adoc[leveloffset=+2]
136+
137+
[role="_additional-resources"]
138+
.Additional resources
139+
140+
* For more information about enabling an SELinux boolean on a node, see xref:../../nodes/nodes/nodes-nodes-managing.adoc#nodes-nodes-working-setting-booleans_nodes-nodes-managing[Setting SELinux booleans]
141+
134142
include::modules/configuring-ovnk-additional-networks.adoc[leveloffset=+2]
135143
include::modules/configuration-ovnk-network-plugin-json-object.adoc[leveloffset=+3]
136144
//include::modules/configuring-layer-three-routed-topology.adoc[leveloffset=+3]
@@ -143,4 +151,4 @@ include::modules/nw-multus-ipam-object.adoc[leveloffset=+1]
143151

144152
include::modules/nw-multus-create-network.adoc[leveloffset=+1]
145153

146-
include::modules/nw-multus-create-network-apply.adoc[leveloffset=+1]
154+
include::modules/nw-multus-create-network-apply.adoc[leveloffset=+1]

networking/multiple_networks/understanding-multiple-networks.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,6 @@ networks in your cluster:
5757

5858
* *macvlan*: xref:../../networking/multiple_networks/configuring-additional-network.adoc#nw-multus-macvlan-object_configuring-additional-network[Configure a macvlan-based additional network] to allow pods on a host to communicate with other hosts and pods on those hosts by using a physical network interface. Each pod that is attached to a macvlan-based additional network is provided a unique MAC address.
5959

60+
* *tap*: xref:../../networking/multiple_networks/configuring-additional-network.adoc#nw-multus-tap-object_configuring-additional-network[Configure a tap-based additional network] to create a tap device inside the container namespace. A tap device enables user space programs to send and receive network packets.
61+
6062
* *SR-IOV*: xref:../../networking/hardware_networks/about-sriov.adoc#about-sriov[Configure an SR-IOV based additional network] to allow pods to attach to a virtual function (VF) interface on SR-IOV capable hardware on the host system.

0 commit comments

Comments
 (0)