Skip to content

Commit c09694c

Browse files
yansun1996enricoschiattarella
authored andcommitted
[DOC] Document different scenarios for configuring OpenShift NFD Operator
1 parent 40eeca8 commit c09694c

File tree

1 file changed

+44
-4
lines changed

1 file changed

+44
-4
lines changed

docs/installation/openshift-olm.md

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,15 @@ oc get pods -n openshift-image-registry
105105

106106
### 1. Create Node Feature Discovery Rule
107107

108-
Create an NFD rule to detect AMD GPU hardware, please create the ```NodeFeatureDiscovery``` under the namespace where NFD operator is running:
108+
Create an NFD custom resource to detect AMD GPU hardware, based on different deployment scenarios you need to choose creating `NodeFeatureDiscovery` or `NodeFeatureRule`.
109+
110+
* If your OpenShift cluster doesn't have `NodeFeatureDiscovery` deployed
111+
112+
Please create the ```NodeFeatureDiscovery``` under the namespace where NFD operator is running:
109113

110114
```{note}
111115
112-
When you are using OpenShift 4.16 or 4.17 you need to specify the NFD operand image in the following `NodeFeatureDiscovery` custom resource. Starting from OpenShift 4.18 you don't have to specify the operand image since the NFD operator will automatically select corresponding operand image.
116+
When you are using OpenShift 4.16 you need to specify the NFD operand image in the following `NodeFeatureDiscovery` custom resource. Starting from OpenShift 4.17 you don't have to specify the operand image since the NFD operator will automatically select corresponding operand image.
113117
114118
spec:
115119
operand:
@@ -118,7 +122,6 @@ When you are using OpenShift 4.16 or 4.17 you need to specify the NFD operand im
118122
servicePort: 12000
119123
```
120124

121-
122125
```yaml
123126
apiVersion: nfd.openshift.io/v1
124127
kind: NodeFeatureDiscovery
@@ -149,8 +152,11 @@ spec:
149152
matchExpressions:
150153
vendor: {op: In, value: ["1002"]}
151154
device: {op: In, value: [
155+
"74a5", # MI325X
152156
"74a0", # MI300A
153157
"74a1", # MI300X
158+
"74a9", # MI300X-HF
159+
"74bd", # MI300X-HF
154160
"740f", # MI210
155161
"7408", # MI250X
156162
"740c", # MI250/MI250X
@@ -159,7 +165,41 @@ spec:
159165
]}
160166
```
161167
162-
Verify the NFD label is applied:
168+
* If your OpenShift cluster already has `NodeFeatureDiscovery` deployed
169+
170+
You can alternatively create a namespaced `NodeFeatureRule` custom resource to avoid modifying `NodeFeatureDiscovery` which could possibly interrupt the existing node label.
171+
172+
```yaml
173+
apiVersion: nfd.openshift.io/v1alpha1
174+
kind: NodeFeatureRule
175+
metadata:
176+
name: amd-gpu-operator-nfdrule
177+
namespace: openshift-amd-gpu
178+
spec:
179+
rules:
180+
- name: amd-gpu
181+
labels:
182+
feature.node.kubernetes.io/amd-gpu: "true"
183+
matchAny:
184+
- matchFeatures:
185+
- feature: pci.device
186+
matchExpressions:
187+
vendor: {op: In, value: ["1002"]}
188+
device: {op: In, value: [
189+
"74a5", # MI325X
190+
"74a0", # MI300A
191+
"74a1", # MI300X
192+
"74a9", # MI300X-HF
193+
"74bd", # MI300X-HF
194+
"740f", # MI210
195+
"7408", # MI250X
196+
"740c", # MI250/MI250X
197+
"738c", # MI100
198+
"738e" # MI100
199+
]}
200+
```
201+
202+
Finally please verify the NFD label is applied:
163203

164204
```bash
165205
oc get node -o yaml | grep "amd-gpu"

0 commit comments

Comments
 (0)