Skip to content

Commit a792234

Browse files
committed
OCPBUGS-55065: Updated the JSON examples in compatibility-with-multi-network-policy
1 parent 49668e1 commit a792234

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

Diff for: modules/configuring-localnet-switched-topology.adoc

+23-8
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ The switched `localnet` topology interconnects the workloads created as Network
1616
// tag::localnet-content[]
1717
You must map an additional network to the OVN bridge to use it as an OVN-Kubernetes additional network. Bridge mappings allow network traffic to reach the physical network. A bridge mapping associates a physical network name, also known as an interface label, to a bridge created with Open vSwitch (OVS).
1818

19-
You can create an `NodeNetworkConfigurationPolicy` object, part of the `nmstate.io/v1` API group, to declaratively create the mapping. This API is provided by the NMState Operator. By using this API you can apply the bridge mapping to nodes that match your specified `nodeSelector` expression, such as `node-role.kubernetes.io/worker: ''`.
19+
You can create an `NodeNetworkConfigurationPolicy` object, part of the `nmstate.io/v1` API group, to declaratively create the mapping. This API is provided by the NMState Operator. By using this API you can apply the bridge mapping to nodes that match your specified `nodeSelector` expression, such as `node-role.kubernetes.io/worker: ''`. This declarative approach is recommended because the NMState Operator applies additional network configuration to all nodes specified by the node selector automatically and transparently.
2020

21-
When attaching an additional network, you can either use the existing `br-ex` bridge or create a new bridge. Which approach to use depends on your specific network infrastructure.
21+
When attaching an additional network, you can either use the existing `br-ex` bridge or create a new bridge. Which approach to use depends on your specific network infrastructure. Consider the following approaches:
2222

2323
- If your nodes include only a single network interface, you must use the existing bridge. This network interface is owned and managed by OVN-Kubernetes and you must not remove it from the `br-ex` bridge or alter the interface configuration. If you remove or alter the network interface, your cluster network will stop working correctly.
2424
- If your nodes include several network interfaces, you can attach a different network interface to a new bridge, and use that for your additional network. This approach provides for traffic isolation from your primary cluster network.
@@ -47,6 +47,23 @@ spec:
4747
<3> The name for the additional network from which traffic is forwarded to the OVS bridge. This additional network must match the name of the `spec.config.name` field of the `NetworkAttachmentDefinition` CRD that defines the OVN-Kubernetes additional network.
4848
<4> The name of the OVS bridge on the node. This value is required only if you specify `state: present`.
4949
<5> The state for the mapping. Must be either `present` to add the bridge or `absent` to remove the bridge. The default value is `present`.
50+
+
51+
The following JSON example configures a localnet, `localnet1`, secondary network:
52+
+
53+
[source,json]
54+
----
55+
{
56+
"cniVersion": "0.3.1",
57+
"name": "ns1-localnet-network",
58+
"type": "ovn-k8s-cni-overlay",
59+
"topology":"localnet1",
60+
"subnets": "202.10.130.112/28",
61+
"vlanID": 33,
62+
"mtu": 1500,
63+
"netAttachDefName": "ns1/localnet-network",
64+
"excludeSubnets": "10.100.200.0/29"
65+
}
66+
----
5067

5168
In the following example, the `localnet2` network interface is attached to the `ovs-br1` bridge. Through this attachment, the network interface is available to the OVN-Kubernetes network plugin as an additional network.
5269

@@ -87,22 +104,20 @@ spec:
87104
<5> The name for the additional network from which traffic is forwarded to the OVS bridge. This additional network must match the name of the `spec.config.name` field of the `NetworkAttachmentDefinition` CRD that defines the OVN-Kubernetes additional network.
88105
<6> The name of the OVS bridge on the node. This value is required only if you specify `state: present`.
89106
<7> The state for the mapping. Must be either `present` to add the bridge or `absent` to remove the bridge. The default value is `present`.
90-
91-
This declarative approach is recommended because the NMState Operator applies additional network configuration to all nodes specified by the node selector automatically and transparently.
92-
107+
+
93108
The following JSON example configures a localnet secondary network:
94-
109+
+
95110
[source,json]
96111
----
97112
{
98113
"cniVersion": "0.3.1",
99114
"name": "ns1-localnet-network",
100115
"type": "ovn-k8s-cni-overlay",
101-
"topology":"localnet",
116+
"topology":"localnet2",
102117
"subnets": "202.10.130.112/28",
103118
"vlanID": 33,
104119
"mtu": 1500,
105-
"netAttachDefName": "ns1/localnet-network"
120+
"netAttachDefName": "ns1/localnet-network",
106121
"excludeSubnets": "10.100.200.0/29"
107122
}
108123
----

0 commit comments

Comments
 (0)