Skip to content

Commit ea63d53

Browse files
authored
Merge pull request #84261 from sjhala-ccs/cnv-46289
CNV-46289: Added network configuration recommendations
2 parents da1a341 + e6cefb8 commit ea63d53

7 files changed

+151
-70
lines changed

_topic_maps/_topic_map_rosa.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1912,8 +1912,8 @@ Topics:
19121912
# File: virt-using-dpdk-with-sriov
19131913
- Name: Connecting a VM to an OVN-Kubernetes secondary network
19141914
File: virt-connecting-vm-to-ovn-secondary-network
1915-
# - Name: Hot plugging secondary network interfaces
1916-
# File: virt-hot-plugging-network-interfaces
1915+
- Name: Hot plugging secondary network interfaces
1916+
File: virt-hot-plugging-network-interfaces
19171917
- Name: Connecting a VM to a service mesh
19181918
File: virt-connecting-vm-to-service-mesh
19191919
- Name: Configuring a dedicated network for live migration

modules/virt-attaching-vm-to-ovn-secondary-nw-cli.adoc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,23 @@ spec:
2828
domain:
2929
devices:
3030
interfaces:
31-
- name: secondary <1>
31+
- name: secondary # <1>
3232
bridge: {}
3333
resources:
3434
requests:
3535
memory: 1024Mi
3636
networks:
37-
- name: secondary <2>
37+
- name: secondary # <2>
3838
multus:
39-
networkName: <nad_name> <3>
39+
networkName: <nad_name> # <3>
40+
nodeSelector:
41+
node-role.kubernetes.io/worker: '' # <4>
4042
# ...
4143
----
4244
<1> The name of the OVN-Kubernetes secondary interface.
4345
<2> The name of the network. This must match the value of the `spec.template.spec.domain.devices.interfaces.name` field.
4446
<3> The name of the `NetworkAttachmentDefinition` object.
47+
<4> Specifies the nodes on which the VM can be scheduled. The recommended node selector value is `node-role.kubernetes.io/worker: ''`.
4548

4649
. Apply the `VirtualMachine` manifest:
4750
+

modules/virt-creating-localnet-nad-cli.adoc

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,33 @@ You can create a network attachment definition (NAD) which describes how to atta
1212
* You have access to the cluster as a user with `cluster-admin` privileges.
1313
* You have installed the OpenShift CLI (`oc`).
1414
* You have installed the Kubernetes NMState Operator.
15-
* You have created a `NodeNetworkConfigurationPolicy` object to map the OVN-Kubernetes secondary network to an Open vSwitch (OVS) bridge.
1615
1716
.Procedure
1817

18+
. Create a `NodeNetworkConfigurationPolicy` object to map the OVN-Kubernetes secondary network to an Open vSwitch (OVS) bridge:
19+
+
20+
[source,yaml]
21+
----
22+
apiVersion: nmstate.io/v1
23+
kind: NodeNetworkConfigurationPolicy
24+
metadata:
25+
name: mapping # <1>
26+
spec:
27+
nodeSelector:
28+
node-role.kubernetes.io/worker: '' # <2>
29+
desiredState:
30+
ovn:
31+
bridge-mappings:
32+
- localnet: localnet-network # <3>
33+
bridge: br-ex # <4>
34+
state: present # <5>
35+
----
36+
<1> The name of the configuration object.
37+
<2> Specifies the nodes to which the node network configuration policy is to be applied. The recommended node selector value is `node-role.kubernetes.io/worker: ''`.
38+
<3> The name of the additional network from which traffic is forwarded to the OVS bridge. This attribute must match the value of the `spec.config.name` field of the `NetworkAttachmentDefinition` object that defines the OVN-Kubernetes additional network.
39+
<4> The name of the OVS bridge on the node. This value is required if the `state` attribute is `present`.
40+
<5> The state of the mapping. Must be either `present` to add the mapping or `absent` to remove the mapping. The default value is `present`.
41+
1942
. Create a `NetworkAttachmentDefinition` object:
2043
+
2144
[source,yaml]

modules/virt-networking-glossary.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@ API resource that allows you to define custom resources, or an object defined by
2020

2121
Network attachment definition (NAD):: A CRD introduced by the Multus project that allows you to attach pods, virtual machines, and virtual machine instances to one or more networks.
2222

23+
ifndef::openshift-rosa,openshift-dedicated[]
2324
Node network configuration policy (NNCP):: A CRD introduced by the nmstate project, describing the requested network configuration on nodes.
2425
You update the node network configuration, including adding and removing interfaces, by applying a `NodeNetworkConfigurationPolicy` manifest to the cluster.
26+
endif::openshift-rosa,openshift-dedicated[]

virt/vm_networking/virt-connecting-vm-to-ovn-secondary-network.adoc

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,19 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9-
You can connect a virtual machine (VM) to an Open Virtual Network (OVN)-Kubernetes secondary network. {VirtProductName} supports the layer 2 and localnet topologies for OVN-Kubernetes.
9+
ifdef::openshift-rosa,openshift-dedicated[]
10+
You can connect a VM to an Open Virtual Network (OVN)-Kubernetes secondary network. {VirtProductName} supports the `layer2` topology for OVN-Kubernetes.
1011

11-
* A layer 2 topology connects workloads by a cluster-wide logical switch. The OVN-Kubernetes Container Network Interface (CNI) plug-in uses the Geneve (Generic Network Virtualization Encapsulation) protocol to create an overlay network between nodes. You can use this overlay network to connect VMs on different nodes, without having to configure any additional physical networking infrastructure.
12-
13-
* A localnet topology connects the secondary network to the physical underlay. This enables both east-west cluster traffic and access to services running outside the cluster, but it requires additional configuration of the underlying Open vSwitch (OVS) system on cluster nodes.
12+
A `layer2` topology connects workloads by a cluster-wide logical switch. The OVN-Kubernetes Container Network Interface (CNI) plugin uses the Geneve (Generic Network Virtualization Encapsulation) protocol to create an overlay network between nodes. You can use this overlay network to connect VMs on different nodes, without having to configure any additional physical networking infrastructure.
13+
endif::openshift-rosa,openshift-dedicated[]
1414

1515
ifndef::openshift-rosa,openshift-dedicated[]
16+
You can connect a virtual machine (VM) to an OVN-Kubernetes secondary network. {VirtProductName} supports the `layer2` and `localnet` topologies for OVN-Kubernetes.
17+
18+
* A `layer2` topology connects workloads by a cluster-wide logical switch. The OVN-Kubernetes Container Network Interface (CNI) plugin uses the Geneve (Generic Network Virtualization Encapsulation) protocol to create an overlay network between nodes. You can use this overlay network to connect VMs on different nodes, without having to configure any additional physical networking infrastructure.
19+
20+
* A `localnet` topology connects the secondary network to the physical underlay. This enables both east-west cluster traffic and access to services running outside the cluster, but it requires additional configuration of the underlying Open vSwitch (OVS) system on cluster nodes.
21+
1622
[NOTE]
1723
====
1824
An OVN-Kubernetes secondary network is compatible with the xref:../../networking/multiple_networks/configuring-additional-network.adoc#compatibility-with-multi-network-policy_configuring-additional-network[multi-network policy API] which provides the `MultiNetworkPolicy` custom resource definition (CRD) to control traffic flow to and from VMs. You can use the `ipBlock` attribute to define network policy ingress and egress rules for specific CIDR blocks.
@@ -26,7 +32,7 @@ ifndef::openshift-rosa,openshift-dedicated[]
2632
+
2733
[NOTE]
2834
====
29-
For localnet topology, you must xref:../../networking/multiple_networks/configuring-additional-network.adoc#configuring-additional-network_ovn-kubernetes-configuration-for-a-localnet-topology[configure an OVS bridge] by creating a `NodeNetworkConfigurationPolicy` object before creating the NAD.
35+
For `localnet` topology, you must xref:../../networking/multiple_networks/configuring-additional-network.adoc#configuring-additional-network_ovn-kubernetes-configuration-for-a-localnet-topology[configure an OVS bridge] by creating a `NodeNetworkConfigurationPolicy` object before creating the NAD.
3036
====
3137
endif::openshift-rosa,openshift-dedicated[]
3238

@@ -35,7 +41,7 @@ endif::openshift-rosa,openshift-dedicated[]
3541
[id="creating-ovn-nad_{context}"]
3642
== Creating an OVN-Kubernetes NAD
3743

38-
You can create an OVN-Kubernetes layer 2 or localnet network attachment definition (NAD) by using the {product-title} web console or the CLI.
44+
You can create an OVN-Kubernetes network attachment definition (NAD) by using the {product-title} web console or the CLI.
3945

4046
[NOTE]
4147
====
@@ -44,11 +50,15 @@ Configuring IP address management (IPAM) in a network attachment definition for
4450

4551
include::modules/virt-creating-layer2-nad-cli.adoc[leveloffset=+2]
4652

53+
ifndef::openshift-rosa,openshift-dedicated[]
4754
include::modules/virt-creating-localnet-nad-cli.adoc[leveloffset=+2]
55+
endif::openshift-rosa,openshift-dedicated[]
4856

4957
include::modules/virt-creating-nad-l2-overlay-console.adoc[leveloffset=+2]
5058

59+
ifndef::openshift-rosa,openshift-dedicated[]
5160
include::modules/virt-creating-nad-localnet-console.adoc[leveloffset=+2]
61+
endif::openshift-rosa,openshift-dedicated[]
5262

5363
[id="attaching-vm-to-ovn-secondary-nw"]
5464
== Attaching a virtual machine to the OVN-Kubernetes secondary network

virt/vm_networking/virt-hot-plugging-network-interfaces.adoc

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,19 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9-
You can add or remove secondary network interfaces without stopping your virtual machine (VM). {VirtProductName} supports hot plugging for secondary interfaces that use the VirtIO device driver.
9+
ifdef::openshift-rosa,openshift-dedicated[]
10+
You can add or remove secondary network interfaces without stopping your virtual machine (VM). {VirtProductName} supports hot plugging and hot unplugging for secondary interfaces that use bridge binding and the VirtIO device driver.
11+
endif::openshift-rosa,openshift-dedicated[]
12+
13+
14+
ifndef::openshift-rosa,openshift-dedicated[]
15+
You can add or remove secondary network interfaces without stopping your virtual machine (VM). {VirtProductName} supports hot plugging and hot unplugging for secondary interfaces that use bridge binding and the VirtIO device driver. {VirtProductName} also supports hot plugging secondary interfaces that use SR-IOV binding.
1016

1117
[NOTE]
1218
====
1319
Hot unplugging is not supported for Single Root I/O Virtualization (SR-IOV) interfaces.
1420
====
21+
endif::openshift-rosa,openshift-dedicated[]
1522

1623
[id="virtio-limitations_virt-hot-plugging-network-interfaces"]
1724
== VirtIO limitations
@@ -33,7 +40,9 @@ include::modules/virt-hot-unplugging-bridge-network-interface-cli.adoc[leveloffs
3340
== Additional resources
3441

3542
* xref:../../virt/getting_started/virt-using-the-cli-tools.adoc#installing-virtctl_virt-using-the-cli-tools[Installing virtctl]
43+
ifndef::openshift-rosa,openshift-dedicated[]
3644
* xref:../../virt/vm_networking/virt-connecting-vm-to-linux-bridge.adoc#creating-linux-bridge-nad[Creating a Linux bridge network attachment definition]
3745
* xref:../../virt/vm_networking/virt-connecting-vm-to-linux-bridge.adoc#configuring-vm-network-interface[Connecting a virtual machine to a Linux bridge network]
3846
* xref:../../virt/vm_networking/virt-connecting-vm-to-sriov.adoc#nw-sriov-network-attachment_virt-connecting-vm-to-sriov[Creating an SR-IOV network attachment definition]
39-
* xref:../../virt/vm_networking/virt-connecting-vm-to-sriov.adoc#virt-attaching-vm-to-sriov-network_virt-connecting-vm-to-sriov[Connecting a virtual machine to an SR-IOV network]
47+
* xref:../../virt/vm_networking/virt-connecting-vm-to-sriov.adoc#virt-attaching-vm-to-sriov-network_virt-connecting-vm-to-sriov[Connecting a virtual machine to an SR-IOV network]
48+
endif::openshift-rosa,openshift-dedicated[]

0 commit comments

Comments
 (0)