Skip to content

Commit 770b90f

Browse files
committed
SDN-1387: SR-IOV operator fields for single node
Sebastian clarified that for single node installations, customers must set the `spec.disableDrain` field to true. The field must remain set to true for that specialized installation. * Add namespace field and indicate that name and namespace values are not configurable.
1 parent fd41591 commit 770b90f

File tree

1 file changed

+99
-5
lines changed

1 file changed

+99
-5
lines changed

modules/nw-sriov-configuring-operator.adoc

Lines changed: 99 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,57 @@ The `default` CR contains the SR-IOV Network Operator configuration for your clu
2121
To change the operator configuration, you must modify this CR.
2222
=====
2323

24-
The `SriovOperatorConfig` object provides several fields for configuring the operator:
25-
26-
* `enableInjector` allows project administrators to enable or disable the Network Resources Injector daemon set.
27-
* `enableOperatorWebhook` allows project administrators to enable or disable the Operator Admission Controller webhook daemon set.
28-
* `configDaemonNodeSelector` allows project administrators to schedule the SR-IOV Network Config Daemon on selected nodes.
24+
[id="nw-sriov-operator-cr_{context}"]
25+
== SR-IOV Network Operator config custom resource
26+
27+
The fields for the `sriovoperatorconfig` custom resource are described in the following table:
28+
29+
.SR-IOV Network Operator config custom resource
30+
[cols=".^2,.^2,.^6a",options="header"]
31+
|====
32+
|Field|Type|Description
33+
34+
|`metadata.name`
35+
|`string`
36+
|Specifies the name of the SR-IOV Network Operator instance.
37+
The default value is `default`.
38+
Do not set a different value.
39+
40+
|`metadata.namespace`
41+
|`string`
42+
|Specifies the namespace of the SR-IOV Network Operator instance.
43+
The default value is `openshift-sriov-network-operator`.
44+
Do not set a different value.
45+
46+
|`spec.configDaemonNodeSelector`
47+
|`string`
48+
|Specifies the node selection to control scheduling the SR-IOV Network Config Daemon on selected nodes.
49+
By default, this field is not set and the Operator deploys the SR-IOV Network Config daemon set on worker nodes.
50+
51+
|`spec.disableDrain`
52+
|`boolean`
53+
|Specifies whether to disable the node draining process or enable the node draining process when you apply a new policy to configure the NIC on a node.
54+
Setting this field to `true` facilitates software development and installing {product-title} on a single node. By default, this field is not set.
55+
56+
For single node clusters, set this field to `true` after installing the Operator. This field must remain set to `true`.
57+
58+
|`spec.enableInjector`
59+
|`boolean`
60+
|Specifies whether to enable or disable the Network Resources Injector daemon set.
61+
By default, this field is set to `true`.
62+
63+
|`spec.enableOperatorWebhook`
64+
|`boolean`
65+
|Specifies whether to enable or disable the Operator Admission Controller webhook daemon set.
66+
By default, this field is set to `true`.
67+
68+
|`spec.logLevel`
69+
|`integer`
70+
|Specifies the log verbosity level of the Operator.
71+
Set to `0` to show only the basic logs. Set to `2` to show all the available logs.
72+
By default, this field is set to `2`.
73+
74+
|====
2975

3076
[id="about-network-resource-injector_{context}"]
3177
== About the Network Resources Injector
@@ -208,3 +254,51 @@ spec:
208254
<node_label>
209255
----
210256
====
257+
258+
[id="configure-sr-iov-operator-single-node_{context}"]
259+
== Configuring the SR-IOV Network Operator for single node installations
260+
261+
By default, the SR-IOV Network Operator drains workloads from a node before every policy change.
262+
The Operator performs this action to ensure that there no workloads using the virtual functions before the reconfiguration.
263+
264+
For installations on a single node, there are no other nodes to receive the workloads.
265+
As a result, the Operator must be configured not to drain the workloads from the single node.
266+
267+
[IMPORTANT]
268+
====
269+
After performing the following procedure to disable draining workloads, you must remove any workload that uses an SR-IOV network interface before you change any SR-IOV network node policy.
270+
====
271+
272+
.Prerequisites
273+
274+
* Install the OpenShift CLI (`oc`).
275+
* Log in as a user with `cluster-admin` privileges.
276+
* You must have installed the SR-IOV Network Operator.
277+
278+
.Procedure
279+
280+
- To set the `disableDrain` field to `true`, enter the following command:
281+
+
282+
[source,terminal]
283+
----
284+
$ oc patch sriovoperatorconfig default --type=merge \
285+
-n openshift-sriov-network-operator \
286+
--patch '{ "spec": { "disableDrain": true } }'
287+
----
288+
+
289+
[TIP]
290+
====
291+
You can alternatively apply the following YAML to update the Operator:
292+
293+
[source,yaml]
294+
----
295+
apiVersion: sriovnetwork.openshift.io/v1
296+
kind: SriovOperatorConfig
297+
metadata:
298+
name: default
299+
namespace: openshift-sriov-network-operator
300+
spec:
301+
disableDrain: true
302+
----
303+
====
304+

0 commit comments

Comments
 (0)