Skip to content

Commit

Permalink
Merge pull request #46 from almaslennikov/examples
Browse files Browse the repository at this point in the history
Add an example configuration and update README
  • Loading branch information
almaslennikov authored Nov 11, 2024
2 parents 86f6bff + 2694c07 commit 56b1846
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ If more than one template match a single device, none will be applied and the er

for more information refer to [api-reference](docs/api-reference.md).

#### Example NICConfigurationTemplate
#### [Example NICConfigurationTemplate](docs/examples/example-nicconfigurationtemplate-connectx6.yaml):

```yaml
apiVersion: configuration.net.nvidia.com/v1alpha1
Expand All @@ -66,7 +66,7 @@ spec:
nodeSelector:
feature.node.kubernetes.io/network-sriov.capable: "true"
nicSelector:
# nicType selector is mandatory the rest are optional only a single type can be specified.
# nicType selector is mandatory the rest are optional. Only a single type can be specified.
nicType: 101b
pciAddresses:
- "0000:03:00.0"
Expand All @@ -80,7 +80,7 @@ spec:
pciPerformanceOptimized:
enabled: true
maxAccOutRead: 44
maxReadRequest: 5
maxReadRequest: 4096
roceOptimized:
enabled: true
qos:
Expand All @@ -90,8 +90,10 @@ spec:
enabled: true
env: Baremetal
rawNvConfig:
THIS_IS_A_SPECIAL_NVCONFIG_PARAM: "55"
SOME_ADVANCED_NVCONFIG_PARAM: "true"
- name: THIS_IS_A_SPECIAL_NVCONFIG_PARAM
value: "55"
- name: SOME_ADVANCED_NVCONFIG_PARAM
value: "true"
```
#### Configuration details
Expand Down
40 changes: 40 additions & 0 deletions docs/examples/example-nicconfigurationtemplate-connectx6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Change this template first as it only provides an example of configuration
apiVersion: configuration.net.nvidia.com/v1alpha1
kind: NicConfigurationTemplate
metadata:
name: connectx6-config
namespace: nic-configuration-operator
spec:
nodeSelector:
feature.node.kubernetes.io/network-sriov.capable: "true"
nicSelector:
# nicType selector is mandatory the rest are optional. Only a single type can be specified.
nicType: 101b
pciAddresses:
- "0000:03:00.0"
- “0000:04:00.0”
serialNumbers:
- "MT2116X09299"
resetToDefault: false # if set, template is ignored, device configuration should reset
template:
numVfs: 2
linkType: Ethernet
pciPerformanceOptimized:
enabled: true
# default values for maxAccOutRead and maxReadRequest listed below, can be omitted
maxAccOutRead: 44
maxReadRequest: 4096
roceOptimized:
enabled: true
# default values for qos listed below, can be omitted
qos:
trust: dscp
pfc: "0,0,0,1,0,0,0,0"
gpuDirectOptimized:
enabled: true
env: Baremetal
rawNvConfig:
- name: THIS_IS_A_SPECIAL_NVCONFIG_PARAM
value: "55"
- name: SOME_ADVANCED_NVCONFIG_PARAM
value: "true"

0 comments on commit 56b1846

Please sign in to comment.