Skip to content

Commit d0840f2

Browse files
Merge pull request #216 from e0ne/rdma-cni
2 parents 284d552 + 0727e41 commit d0840f2

File tree

1 file changed

+128
-0
lines changed

1 file changed

+128
-0
lines changed

docs/getting-started-kubernetes.rst

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ Below are deployment examples, which the ``values.yaml`` file provided to the He
164164
165165
helm install -f ./values.yaml -n nvidia-network-operator --create-namespace --wait nvidia/network-operator network-operator
166166
167+
.. _shared_device_plugin_deployment:
168+
167169
----------------------------------------------------------
168170
Network Operator Deployment with RDMA Shared Device Plugin
169171
----------------------------------------------------------
@@ -2554,6 +2556,132 @@ Please see the following DOCA documentation for OVS hardware offload verificatio
25542556

25552557
* `OVS-DOCA Hardware Offloads <https://docs.nvidia.com/doca/sdk/ovs-doca+hardware+offloads/index.html>`_
25562558

2559+
-------------------------------------------------------------
2560+
Network Operator Deployment and RDMA exclusive subsystem mode
2561+
-------------------------------------------------------------
2562+
2563+
When RDMA subsystem is in shared mode, RDMA device is accessible in all network namespace. When RDMA device isolation
2564+
among multiple network namespaces is not needed, shared mode can be used. This mode is enabled by default.
2565+
2566+
.. note::
2567+
To use RDMA shared mode with MacVlanNetwork please check :ref:`shared_device_plugin_deployment` section.
2568+
2569+
When user wants to assign dedicated RDMA device to a particular network namespace, exclusive mode should be configured.
2570+
2571+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2572+
SR-IOV Network Operator Configuration
2573+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2574+
2575+
First install the Network Operator with NFD and SR-IOV Operator enabled:
2576+
2577+
``values.yaml``:
2578+
2579+
.. code-block:: yaml
2580+
2581+
nfd:
2582+
enabled: true
2583+
2584+
sriovNetworkOperator:
2585+
enabled: true
2586+
2587+
To configure RDMA exclusive mode apply ``SriovNetworkPoolConfig`` CR and specify ``rdmaMode``:
2588+
2589+
``sriov-network-pool-config-number.yaml``
2590+
2591+
.. code-block:: yaml
2592+
2593+
apiVersion: sriovnetwork.openshift.io/v1
2594+
kind: SriovNetworkPoolConfig
2595+
metadata:
2596+
name: rdma-exclusive-pool
2597+
namespace: nvidia-network-operator
2598+
spec:
2599+
nodeSelector:
2600+
- matchExpressions:
2601+
- key: feature.node.kubernetes.io/pci-15b3.present
2602+
operator: "Exists"
2603+
rdmaMode: exclusive
2604+
2605+
2606+
The ``sriovnetwork-node-policy.yaml`` configuration should be applied to configure SR-IOV and deploy `RDMA CNI <https://github.com/k8snetworkplumbingwg/rdma-cni>`_:
2607+
2608+
.. code-block:: yaml
2609+
2610+
apiVersion: sriovnetwork.openshift.io/v1
2611+
kind: SriovNetworkNodePolicy
2612+
metadata:
2613+
name: policy-1
2614+
namespace: nvidia-network-operator
2615+
spec:
2616+
deviceType: netdevice
2617+
mtu: 1500
2618+
nicSelector:
2619+
vendor: "15b3"
2620+
pfNames: ["ens2f0"]
2621+
nodeSelector:
2622+
feature.node.kubernetes.io/pci-15b3.present: "true"
2623+
numVfs: 8
2624+
priority: 90
2625+
isRdma: true
2626+
resourceName: sriov_resource
2627+
2628+
2629+
RDMA CNI plugin is intended to be run as a chained CNI plugin:
2630+
2631+
.. code-block:: yaml
2632+
2633+
apiVersion: sriovnetwork.openshift.io/v1
2634+
kind: SriovNetwork
2635+
metadata:
2636+
name: "example-sriov-network"
2637+
namespace: nvidia-network-operator
2638+
spec:
2639+
vlan: 0
2640+
networkNamespace: "default"
2641+
resourceName: "sriov_resource"
2642+
ipam: |-
2643+
{
2644+
"type": "nv-ipam",
2645+
"poolName": "pool1"
2646+
}
2647+
metaPlugins: |
2648+
{
2649+
"type": "rdma"
2650+
}
2651+
2652+
^^^^^^^^^^^^^^
2653+
Test Workload
2654+
^^^^^^^^^^^^^^
2655+
2656+
The ``pod.yaml`` configuration file for such a deployment:
2657+
2658+
.. code-block:: yaml
2659+
2660+
apiVersion: v1
2661+
kind: Pod
2662+
metadata:
2663+
name: testpod1
2664+
annotations:
2665+
k8s.v1.cni.cncf.io/networks: example-sriov-network
2666+
spec:
2667+
containers:
2668+
- name: appcntr1
2669+
image: <image>
2670+
imagePullPolicy: IfNotPresent
2671+
securityContext:
2672+
capabilities:
2673+
add: ["IPC_LOCK"]
2674+
resources:
2675+
requests:
2676+
nvidia.com/sriov_resource: '1'
2677+
limits:
2678+
nvidia.com/sriov_resource: '1'
2679+
command:
2680+
- sh
2681+
- -c
2682+
- sleep inf
2683+
2684+
25572685
===========================================================================
25582686
Configure NIC Firmware using the NIC Configuration Operator
25592687
===========================================================================

0 commit comments

Comments
 (0)