Decision Automation
Configure SR-IOV Nodes
Enable LLDP on SR-IOV Nodes
Follow these steps to use NMState to enable LLDP on your SR-IOV nodes.
Change the interfaces and apply the YAML file below for the NodeNetworkConfigurationPolicy.
apiVersion: nmstate.io/v1 kind: NodeNetworkConfigurationPolicy metadata: name: lldp-node-policy spec: nodeSelector: node-role.kubernetes.io/worker: "" # Label the node role worker node if not already maxUnavailable: 3 desiredState: interfaces: - name: enp4s0f0 type: ethernet lldp: enabled: true - name: enp4s0f1 type: ethernet lldp: enabled: true
Issue the following command to check the state of the NodeNetworkState, and you can see that the LLDP neighbors are visible.
kubectl get NodeNetworkState <nodeName> -o yaml ```yaml lldp: enabled: true neighbors:
Apply SR-IOV Network Node Policy
Create an SR-IOV network node policy to specify the SR-IOV network device configuration. The API object for the policy is part of the sriovnetwork.openshift.io API group.
Here's an example SR-IOV network node policy YAML file:
apiVersion: sriovnetwork.openshift.io/v1 kind: SriovNetworkNodePolicy metadata: labels: cluster: rhocpdemo name: enp4s0f0-vfs namespace: openshift-sriov-network-operator spec: deviceType: netdevice isRdma: false needVhostNet: true nicSelector: pfNames: - enp4s0f0 nodeSelector: feature.node.kubernetes.io/network-sriov.capable: "true" numVfs: 4 priority: 99 resourceName: enp4s0f0_vfs
Here's another example SR-IOV network node policy YAML file:
apiVersion: sriovnetwork.openshift.io/v1 kind: SriovNetworkNodePolicy metadata: labels: cluster: rhocpdemo name: enp4s0f1-vfs namespace: openshift-sriov-network-operator spec: deviceType: netdevice isRdma: false needVhostNet: true nicSelector: pfNames: - enp4s0f1 nodeSelector: feature.node.kubernetes.io/network-sriov.capable: "true" numVfs: 4 priority: 99 resourceName: enp4s0f1_vfs
See Configuring an SR-IOV Network Device for detailed information on each field in the SR-IOV network node policy.
Mappings of OpenShift Objects with Apstra Objects
The following table highlights what you can expect while creating various OpenShift objects.
OpenShift Object | Apstra Object | Description |
---|---|---|
Project |
Routing Zones (VRF) |
Creating/Deleting a project will create Routing Zones (VRF) in Apstra. |
SriovNetwork |
Virtual Networks( VNET) |
Creating/Deleting a SriovNetwork will create Virtual Networks( VNET) in Apstra. |
Pod |
Connectivity Template |
Creating of VNET creates connectivity template automatically in Apstra. The pod is mapped to the respective nodes and ports in the connectivity templates dynamically. |