Skip to content

Commit 0eea9e5

Browse files
authored
Merge pull request #102739 from dfitzmau/OSDOCS-16835
OSDOCS-16835: Completed the CQA2.0 for Secondary Network Advanced Con…
2 parents cc24885 + b9ce062 commit 0eea9e5

File tree

77 files changed

+834
-755
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+834
-755
lines changed

microshift_networking/microshift_network_policy/microshift-creating-network-policy.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ include::_attributes/common-attributes.adoc[]
77

88
toc::[]
99

10+
[role="_abstract"]
1011
You can create a network policy for a namespace.
1112

12-
//OCP modules, edit using conditions and with care (check OCP previews, too)
1313
include::modules/nw-networkpolicy-object.adoc[leveloffset=+1]
1414

1515
include::modules/nw-networkpolicy-create-cli.adoc[leveloffset=+1]

microshift_networking/microshift_network_policy/microshift-deleting-network-policy.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ include::_attributes/attributes-microshift.adoc[]
77

88
toc::[]
99

10+
[role="_abstract"]
1011
You can delete a network policy from a namespace.
1112

1213
include::modules/nw-networkpolicy-delete-cli.adoc[leveloffset=+1]

microshift_networking/microshift_network_policy/microshift-editing-network-policy.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ include::_attributes/common-attributes.adoc[]
77

88
toc::[]
99

10-
You can edit an existing network policy for a namespace. Typical edits might include changes to the pods to which the policy applies, allowed ingress traffic, and the destination ports on which to accept traffic. The `apiVersion`, `kind`, and `name` fields must not be changed when editing `NetworkPolicy` objects, as these define the resource itself.
10+
[role="_abstract"]
11+
You can edit an existing network policy for a namespace.
12+
13+
Typical edits might include changes to the pods to which the policy applies, allowed ingress traffic, and the destination ports on which to accept traffic. The `apiVersion`, `kind`, and `name` fields must not be changed when editing `NetworkPolicy` objects, as these define the resource itself.
1114

12-
//OCP modules, edit using conditionals
1315
include::modules/nw-networkpolicy-edit.adoc[leveloffset=+1]
1416

1517
include::modules/nw-networkpolicy-object.adoc[leveloffset=+1]

microshift_networking/microshift_network_policy/microshift-viewing-network-policy.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ include::_attributes/attributes-microshift.adoc[]
77

88
toc::[]
99

10+
[role="_abstract"]
1011
Use the following procedure to view a network policy for a namespace.
1112

1213
include::modules/nw-networkpolicy-view-cli.adoc[leveloffset=+1]

modules/cnf-assigning-a-secondary-network-to-a-vrf.adoc

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,22 @@
66
[id="cnf-creating-an-additional-network-attachment-with-the-cni-vrf-plug-in_{context}"]
77
= Creating a secondary network attachment with the CNI VRF plugin
88

9-
The Cluster Network Operator (CNO) manages secondary network definitions. When you specify a secondary network to create, the CNO creates the `NetworkAttachmentDefinition` custom resource (CR) automatically.
9+
[role="_abstract"]
10+
The Cluster Network Operator (CNO) manages secondary network definitions. When you specify a secondary network in the cluster-scoped `Network` custom resource (CR), the CNO automatically creates the `NetworkAttachmentDefinition` CR.
1011
1112
[NOTE]
1213
====
1314
Do not edit the `NetworkAttachmentDefinition` CRs that the Cluster Network Operator manages. Doing so might disrupt network traffic on your secondary network.
1415
====
1516
16-
To create a secondary network attachment with the CNI VRF plugin, perform the following procedure.
17-
1817
.Prerequisites
1918
20-
* Install the {product-title} CLI (oc).
21-
* Log in to the OpenShift cluster as a user with cluster-admin privileges.
19+
* Install the {oc-first}.
20+
* Log in to the cluster as a user with `cluster-admin` privileges.
2221
2322
.Procedure
2423
25-
. Create the `Network` custom resource (CR) for the additional network attachment and insert the `rawCNIConfig` configuration for the secondary network, as in the following example CR. Save the YAML as the file `additional-network-attachment.yaml`.
24+
. Create the `Network` CR for the additional network attachment and insert the `rawCNIConfig` configuration for the secondary network. Save as the `additional-network-attachment.yaml` file.
2625
+
2726
[source,yaml]
2827
----
@@ -38,7 +37,7 @@ spec:
3837
rawCNIConfig: '{
3938
"cniVersion": "0.3.1",
4039
"name": "macvlan-vrf",
41-
"plugins": [ <1>
40+
"plugins": [
4241
{
4342
"type": "macvlan",
4443
"master": "eth1",
@@ -52,16 +51,19 @@ spec:
5251
}
5352
},
5453
{
55-
"type": "vrf", <2>
56-
"vrfname": "vrf-1", <3>
57-
"table": 1001 <4>
54+
"type": "vrf",
55+
"vrfname": "vrf-1",
56+
"table": 1001
5857
}]
5958
}'
6059
----
61-
<1> `plugins` must be a list. The first item in the list must be the secondary network underpinning the VRF network. The second item in the list is the VRF plugin configuration.
62-
<2> `type` must be set to `vrf`.
63-
<3> `vrfname` is the name of the VRF that the interface is assigned to. If it does not exist in the pod, it is created.
64-
<4> Optional. `table` is the routing table ID. By default, the `tableid` parameter is used. If it is not specified, the CNI assigns a free routing table ID to the VRF.
60+
+
61+
where:
62+
+
63+
`plugins`:: You must specify a list. The first item in the list must be the secondary network underpinning the VRF network. The second item in the list is the VRF plugin configuration.
64+
`type`:: You must set this parameter to `vrf`.
65+
`vrfname`:: The name of the VRF that the interface is assigned to. If the VRF does not exist in the pod, the CNI creates the VRF.
66+
`table`:: Optional parameter. Specify the routing table ID. By default, the `tableid` parameter is used. If you do not specify a table ID, the CNI assigns a free routing table ID to the VRF.
6567
+
6668
[NOTE]
6769
====
@@ -84,16 +86,15 @@ $ oc get network-attachment-definitions -n <namespace>
8486
+
8587
[NOTE]
8688
====
87-
There might be a delay before the CNO creates the CR.
89+
A delay might exist before the CNO creates the CR.
8890
====
8991
9092
.Verification
9193
92-
. Create a pod and assign it to the secondary network with the VRF instance:
93-
94-
.. Create a YAML file that defines the `Pod` resource:
94+
. Create a pod and assign the pod to the secondary network that includes the VRF plugin configuration.
95+
+
96+
.. Create a YAML file that defines the `Pod` resource, as demonstrated in the following `pod-additional-net.yaml` file:
9597
+
96-
.Example `pod-additional-net.yaml` file
9798
[source,yaml]
9899
----
99100
apiVersion: v1
@@ -112,30 +113,32 @@ spec:
112113
command: ["/bin/bash", "-c", "sleep 9000000"]
113114
image: centos:8
114115
----
115-
<1> Specify the name of the secondary network with the VRF instance.
116-
116+
+
117+
where:
118+
+
119+
`name`:: Specify the name of the secondary network that includes the VRF plugin configuration.
120+
+
117121
.. Create the `Pod` resource by running the following command. The expected output shows the name of the `Pod` resource and the creation age in minutes.
118122
+
119123
[source,terminal]
120124
----
121125
$ oc create -f pod-additional-net.yaml
122126
----
123127
124-
. Verify that the pod network attachment is connected to the VRF secondary network. Start a remote session with the pod and run the following command. The expected output shows the name of the VRF interface and its unique ID in the routing table.
128+
. Verify that the pod network attachment connects to the VRF secondary network. Start a remote session with the pod and run the following command. The expected output shows the name of the VRF interface and its unique ID in the routing table.
125129
+
126130
[source,terminal]
127131
----
128132
$ ip vrf show
129133
----
130134
131-
. Confirm that the VRF interface is the controller for the secondary interface:
135+
. Confirm that the VRF interface is the controller for the secondary interface by entering the following command:
132136
+
133137
[source,terminal]
134138
----
135139
$ ip link
136140
----
137141
+
138-
.Example output
139142
[source,terminal]
140143
----
141144
5: net1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master red state UP mode

modules/cnf-creating-an-additional-sriov-network-with-vrf-plug-in.adoc

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[id="cnf-creating-an-additional-sriov-network-with-vrf-plug-in_{context}"]
77
= Creating an additional SR-IOV network attachment with the CNI VRF plugin
88

9+
[role="_abstract"]
910
The SR-IOV Network Operator manages additional network definitions. When you specify an additional SR-IOV network to create, the SR-IOV Network Operator creates the `NetworkAttachmentDefinition` custom resource (CR) automatically.
1011

1112
[NOTE]
@@ -17,14 +18,13 @@ To create an additional SR-IOV network attachment with the CNI virtual routing a
1718

1819
.Prerequisites
1920

20-
* Install the {product-title} CLI (oc).
21+
* Install the {oc-first}.
2122
* Log in to the {product-title} cluster as a user with cluster-admin privileges.
2223
2324
.Procedure
2425

2526
. Create the `SriovNetwork` custom resource (CR) for the additional SR-IOV network attachment and insert the `metaPlugins` configuration, as in the following example CR. Save the YAML as the file `sriov-network-attachment.yaml`.
2627
+
27-
.Example `SriovNetwork` custom resource (CR) example
2828
[source,yaml]
2929
----
3030
apiVersion: sriovnetwork.openshift.io/v1
@@ -49,11 +49,14 @@ spec:
4949
metaPlugins : |
5050
{
5151
"type": "vrf", <1>
52-
"vrfname": "example-vrf-name" <2>
52+
"vrfname": "example-vrf-name"
5353
}
5454
----
55-
<1> Set the `type` parameter to `vrf`.
56-
<2> Specify a name for the VRF in the `vrfname` parameter. An interface gets assigned to the VRF. If you do not specify a name for the VRF in a pod, the SR-IOV Network Operator automatically generates a name for the VRF.
55+
+
56+
where:
57+
+
58+
`metaPlugins.type`:: Set the `type` parameter to `vrf`.
59+
`metaPlugins.vrfname`:: Specify a name for the VRF in the `vrfname` parameter. An interface gets assigned to the VRF. If you do not specify a name for the VRF in a pod, the SR-IOV Network Operator automatically generates a name for the VRF.
5760

5861
. Create the `SriovNetwork` resource:
5962
+
@@ -62,42 +65,39 @@ spec:
6265
$ oc create -f sriov-network-attachment.yaml
6366
----
6467

65-
.Verifying that the `NetworkAttachmentDefinition` CR is successfully created
68+
.Verification
6669

67-
* Confirm that the SR-IOV Network Operator created the `NetworkAttachmentDefinition` CR by running the following command. The expected output shows the name of the NAD CR and the creation age in minutes.
70+
. Confirm that the SR-IOV Network Operator created the `NetworkAttachmentDefinition` CR by running the following command. The expected output shows the name of the NAD CR and the creation age in minutes.
6871
+
6972
[source,terminal]
7073
----
71-
$ oc get network-attachment-definitions -n <namespace> <1>
74+
$ oc get network-attachment-definitions -n <namespace>
7275
----
73-
<1> Replace `<namespace>` with the namespace that you specified when configuring the network attachment, for example, `additional-sriov-network-1`.
76+
+
77+
* `<namespace>`: Replace `<namespace>` with the namespace that you specified when configuring the network attachment, for example, `additional-sriov-network-1`.
7478
+
7579
[NOTE]
7680
====
7781
There might be a delay before the SR-IOV Network Operator creates the CR.
7882
====
7983
80-
.Verifying that the additional SR-IOV network attachment is successful
81-
82-
To verify that the VRF CNI is correctly configured and that the additional SR-IOV network attachment is attached, do the following:
83-
84-
. Create an SR-IOV network that uses the VRF CNI.
85-
86-
. Assign the network to a pod.
87-
88-
. Verify that the pod network attachment connects to the SR-IOV additional network. Ensure that you remote shell login into the pod and run the following command. The expected output shows the name of the VRF interface and its unique ID in the routing table.
84+
. To verify that the VRF CNI is correctly configured and that the additional SR-IOV network attachment is attached, do the following:
85+
+
86+
.. Create an SR-IOV network that uses the VRF CNI.
87+
+
88+
.. Assign the network to a pod.
89+
+
90+
.. Verify that the pod network attachment connects to the SR-IOV additional network. Ensure that you remote shell login into the pod and run the following command. The expected output shows the name of the VRF interface and its unique ID in the routing table.
8991
+
9092
[source,terminal]
9193
----
9294
$ ip vrf show
9395
----
94-
95-
. Confirm that the VRF interface is `master` of the secondary interface by running the following command:
96+
+
97+
.. Confirm that the VRF interface is `master` for the secondary interface by running the following command. Example output shows `5: net1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master red state UP mode`.
9698
+
9799
[source,terminal]
98100
----
99101
$ ip link
100102
----
101-
+
102-
Example output: `5: net1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master red state UP mode`
103103

modules/configuration-ovnk-multi-network-policy.adoc

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
//
33
// * networking/multiple_networks/secondary_networks/creating-secondary-nwt-ovnk.adoc
44

5-
:_mod-docs-content-type: CONCEPT
5+
:_mod-docs-content-type: REFERENCE
66
[id="compatibility-with-multi-network-policy_{context}"]
77
= Compatibility with multi-network policy
88

9-
The multi-network policy API, which is provided by the `MultiNetworkPolicy` custom resource definition (CRD) in the `k8s.cni.cncf.io` API group, is compatible with an OVN-Kubernetes secondary network. When defining a network policy, the network policy rules that can be used depend on whether the OVN-Kubernetes secondary network defines the `subnets` field. Refer to the following table for details:
9+
[role="_abstract"]
10+
When defining a network policy, the network policy rules that can be used depend on whether the OVN-Kubernetes secondary network defines the `subnets` field.
11+
12+
The multi-network policy API, which is provided by the `MultiNetworkPolicy` custom resource definition (CRD) in the `k8s.cni.cncf.io` API group, is compatible with an OVN-Kubernetes secondary network.
13+
14+
Refer to the following table that details supported multi-network policy selectors that are based on a `subnets` CNI configuration:
1015
11-
.Supported multi-network policy selectors based on `subnets` CNI configuration
1216
[cols=".^3,.^7",options="header"]
1317
|====
1418
a|`subnets` field specified|Allowed multi-network policy selectors
@@ -26,9 +30,8 @@ a|
2630
2731
|====
2832
29-
You can use the `k8s.v1.cni.cncf.io/policy-for` annotation on a `MultiNetworkPolicy` object to point to a `NetworkAttachmentDefinition` (NAD) custom resource (CR). The NAD CR defines the network to which the policy applies. The following example multi-network policy is valid only if the `subnets` field is defined in the secondary network CNI configuration for the secondary network named `blue2`:
33+
You can use the `k8s.v1.cni.cncf.io/policy-for` annotation on a `MultiNetworkPolicy` object to point to a `NetworkAttachmentDefinition` (NAD) custom resource (CR). The NAD CR defines the network to which the policy applies. The following example multi-network policy that uses a pod selector is valid only if the `subnets` field is defined in the secondary network CNI configuration for the secondary network named `blue2`:
3034
31-
.Example multi-network policy that uses a pod selector
3235
[source,yaml]
3336
----
3437
apiVersion: k8s.cni.cncf.io/v1beta1
@@ -44,7 +47,7 @@ spec:
4447
- podSelector: {}
4548
----
4649
47-
The following example uses the `ipBlock` network policy selector, which is always valid for an OVN-Kubernetes secondary network:
50+
The following example uses the `ipBlock` network multi-network policy that is always valid for an OVN-Kubernetes secondary network:
4851
4952
.Example multi-network policy that uses an IP block selector
5053
[source,yaml]

modules/configuration-ovnk-network-plugin-json-object.adoc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
[id="configuration-ovnk-network-plugin-json-object_{context}"]
77
= OVN-Kubernetes network plugin JSON configuration table
88

9-
The following table describes the configuration parameters for the OVN-Kubernetes CNI network plugin:
9+
[role="_abstract"]
10+
The OVN-Kubernetes network plugin JSON configuration object describes the configuration parameters for the OVN-Kubernetes CNI network plugin. The following table details these parameters:
1011

1112
.OVN-Kubernetes network plugin JSON configuration table
1213
[cols=".^2,.^2,.^6",options="header"]
@@ -21,9 +22,7 @@ The CNI specification version. The required value is `0.3.1`.
2122
|`name`
2223
|`string`
2324
|
24-
The name of the network. These networks are not namespaced. For example, a network named `l2-network` can be referenced by `NetworkAttachmentDefinition` custom resources (CRs) that exist in different namespaces.
25-
This configuration allows pods that use the `NetworkAttachmentDefinition` CR in different namespaces to communicate over the same secondary network.
26-
However, the `NetworkAttachmentDefinition` CRs must share the same network-specific parameters, such as `topology`, `subnets`, `mtu`, `excludeSubnets`, and `vlanID`. The `vlanID` parameter applies only when the `topology` field is set to `localnet`.
25+
The name of the network. These networks are not namespaced. For example, a network named `l2-network` can be referenced by `NetworkAttachmentDefinition` custom resources (CRs) that exist in different namespaces. This configuration allows pods that use the `NetworkAttachmentDefinition` CR in different namespaces to communicate over the same secondary network. However, the `NetworkAttachmentDefinition` CRs must share the same network-specific parameters, such as `topology`, `subnets`, `mtu`, `excludeSubnets`, and `vlanID`. The `vlanID` parameter applies only when the `topology` field is set to `localnet`.
2726

2827
|`type`
2928
|`string`
@@ -52,8 +51,7 @@ The maximum transmission unit (MTU). If you do not set a value, the Cluster Netw
5251
|`netAttachDefName`
5352
|`string`
5453
|
55-
The metadata `namespace` and `name` of the network attachment definition CRD where this
56-
configuration is included. For example, if this configuration is defined in a `NetworkAttachmentDefinition` CRD in namespace `ns1` named `l2-network`, this should be set to `ns1/l2-network`.
54+
The metadata `namespace` and `name` of the network attachment definition CRD where this configuration is included. For example, if this configuration is defined in a `NetworkAttachmentDefinition` CRD in namespace `ns1` named `l2-network`, this should be set to `ns1/l2-network`.
5755

5856
|`excludeSubnets`
5957
|`string`

modules/configuring-layer-two-switched-topology.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[id="configuration-layer-two-switched-topology_{context}"]
77
= Configuration for a layer 2 switched topology
88

9+
[role="_abstract"]
910
The switched (layer 2) topology networks interconnect the workloads through a cluster-wide logical switch. This configuration can be used for IPv6 and dual-stack deployments.
1011

1112
[NOTE]

0 commit comments

Comments
 (0)