You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add alternative names discovery and usage guide
Document how to discover interface alternative names in node state
and use them in SR-IOV network policies with examples.
Signed-off-by: Carlos Goncalves <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+78Lines changed: 78 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -288,6 +288,30 @@ status:
288
288
289
289
From this example, in status field, the user can find out there are 2 SRIOV capable NICs on node 'work-node-1'; in spec field, user can learn what the expected configure is generated from the combination of SriovNetworkNodePolicy CRs. In the virtual deployment case, a single VF will be associated with each device.
290
290
291
+
### Discovering Alternative Names
292
+
293
+
Alternative names are automatically discovered by the operator and stored in the `SriovNetworkNodeState` CR. You can view them using:
294
+
295
+
```bash
296
+
$ kubectl get sriovnetworknodestate -n sriov-network-operator <node-name> -o yaml
297
+
```
298
+
299
+
Look for the `altNames` field under each interface in the `status.interfaces` section:
300
+
301
+
```yaml
302
+
status:
303
+
interfaces:
304
+
- name: ens803f1
305
+
altNames:
306
+
- eth0
307
+
- net1
308
+
- sriov1
309
+
pciAddress: 0000:86:00.1
310
+
vendor: "8086"
311
+
deviceID: "1583"
312
+
# ... other fields
313
+
```
314
+
291
315
### SriovNetworkNodePolicy
292
316
293
317
This CRD is the key of SR-IOV network operator. This custom resource should be managed by cluster admin, to instruct the operator to:
@@ -391,6 +415,60 @@ spec:
391
415
392
416
> **NOTE**: Currently only `mellanox` plugin can be disabled.
393
417
418
+
### Alternative Interface Names Support
419
+
420
+
The SR-IOV Network Operator supports using network interface alternative names (altnames) when selecting interfaces in policies. This feature provides additional flexibility when configuring SR-IOV devices, especially in environments where interfaces may have multiple naming conventions.
421
+
422
+
When defining a `SriovNetworkNodePolicy`, you can use alternative names in the `nicSelector.pfNames` field. The operator will automatically match interfaces based on either their primary name or any of their alternative names.
423
+
424
+
**Example:**
425
+
426
+
Consider a network interface with the following properties:
427
+
- Primary name: `ens803f1`
428
+
- Alternative names: `eth0`, `net1`, `sriov1`
429
+
430
+
You can reference this interface using any of these names:
431
+
432
+
```yaml
433
+
apiVersion: sriovnetwork.openshift.io/v1
434
+
kind: SriovNetworkNodePolicy
435
+
metadata:
436
+
name: policy-using-altname
437
+
namespace: sriov-network-operator
438
+
spec:
439
+
deviceType: netdevice
440
+
nicSelector:
441
+
pfNames: ["sriov1"] # Using alternative name instead of ens803f1
0 commit comments