Skip to content

Commit 24499e8

Browse files
committed
OSDOCS-18373 HE-3 CQA B
1 parent 539f3fd commit 24499e8

15 files changed

Lines changed: 347 additions & 173 deletions

hardware_enablement/psap-node-feature-discovery-operator.adoc

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,26 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9+
[role="_abstract"]
910
Learn about the Node Feature Discovery (NFD) Operator and how you can use it to expose node-level information by orchestrating Node Feature Discovery, a Kubernetes add-on for detecting hardware features and system configuration.
1011

1112
include::modules/psap-node-feature-discovery-operator.adoc[leveloffset=+1]
1213

1314
include::modules/psap-installing-node-feature-discovery-operator.adoc[leveloffset=+1]
1415

15-
[id="psap-node-feature-discovery-operator-using-the-operator"]
16-
== Using the Node Feature Discovery Operator
17-
18-
The Node Feature Discovery (NFD) Operator orchestrates all resources needed to run the Node-Feature-Discovery daemon set by watching for a `NodeFeatureDiscovery` custom resource (CR). Based on the `NodeFeatureDiscovery` CR, the Operator creates the operand (NFD) components in the selected namespace. You can edit the CR to use another namespace, image, image pull policy, and `nfd-worker-conf` config map, among other options.
19-
20-
As a cluster administrator, you can create a `NodeFeatureDiscovery` CR by using the {oc-first} or the web console.
21-
22-
23-
[NOTE]
24-
====
25-
Starting with version 4.12, the `operand.image` field in the `NodeFeatureDiscovery` CR is mandatory. If the NFD Operator is deployed by using {olm-first}, OLM automatically sets the `operand.image` field. If you create the `NodeFeatureDiscovery` CR by using the {product-title} CLI or the {product-title} web console, you must set the `operand.image` field explicitly.
26-
====
16+
include::modules/psap-using-node-feature-discovery-operator.adoc[leveloffset=+1]
2717

2818
include::modules/creating-nfd-cr-cli.adoc[leveloffset=+2]
2919

3020
include::modules/creating-nfd-cr-cli-disconnected.adoc[leveloffset=+2]
3121

3222
include::modules/creating-nfd-cr-web-console.adoc[leveloffset=+2]
3323

34-
include::modules/psap-configuring-node-feature-discovery.adoc[leveloffset=+1]
24+
include::modules/nfd-configuring-core.adoc[leveloffset=+1]
25+
26+
include::modules/nfd-configuring-core-klog.adoc[leveloffset=+1]
27+
28+
include::modules/nfd-configuring-sources.adoc[leveloffset=+1]
3529

3630
include::modules/nfd-rules-about.adoc[leveloffset=+1]
3731

modules/creating-nfd-cr-cli-disconnected.adoc

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
[id="creating-nfd-cr-cli-disconnected_{context}"]
77
= Creating a NodeFeatureDiscovery CR by using the CLI in a disconnected environment
88

9-
As a cluster administrator, you can create a `NodeFeatureDiscovery` CR instance by using the {oc-first}.
9+
[role="_abstract"]
10+
Create a `NodeFeatureDiscovery` CR instance in a disconnected environment by using the {oc-first} and a mirror registry to deploy the NFD operand without direct internet access.
1011

1112
.Prerequisites
1213

13-
* You have access to an {product-title} cluster
14+
* You have access to an {product-title} cluster.
1415
* You installed the {oc-first}.
1516
* You logged in as a user with `cluster-admin` privileges.
1617
* You installed the NFD Operator.
@@ -50,13 +51,13 @@ $ skopeo inspect docker://registry.redhat.io/openshift4/ose-node-feature-discove
5051
+
5152
[source,terminal]
5253
----
53-
skopeo copy docker://registry.redhat.io/openshift4/ose-node-feature-discovery@<image_digest> docker://<mirror_registry>/openshift4/ose-node-feature-discovery@<image_digest>
54+
$ skopeo copy docker://registry.redhat.io/openshift4/ose-node-feature-discovery@<image_digest> docker://<mirror_registry>/openshift4/ose-node-feature-discovery@<image_digest>
5455
----
5556
+
5657
.Example command
5758
[source,terminal]
5859
----
59-
skopeo copy docker://registry.redhat.io/openshift4/ose-node-feature-discovery@sha256:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef docker://<your-mirror-registry>/openshift4/ose-node-feature-discovery@sha256:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
60+
$ skopeo copy docker://registry.redhat.io/openshift4/ose-node-feature-discovery@sha256:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef docker://<your_mirror_registry>/openshift4/ose-node-feature-discovery@sha256:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
6061
----
6162

6263
. Create a `NodeFeatureDiscovery` CR:
@@ -70,7 +71,7 @@ metadata:
7071
name: nfd-instance
7172
spec:
7273
operand:
73-
image: <mirror_registry>/openshift4/ose-node-feature-discovery@<image_digest> <1>
74+
image: <mirror_registry>/openshift4/ose-node-feature-discovery@<image_digest>
7475
imagePullPolicy: Always
7576
workerConfig:
7677
configData: |
@@ -142,7 +143,10 @@ spec:
142143
matchOn:
143144
- loadedKMod: ["example_kmod3"]
144145
----
145-
<1> The `operand.image` field is mandatory.
146+
+
147+
where:
148+
+
149+
`operand.image`:: Specifies the required operand image.
146150

147151
. Create the `NodeFeatureDiscovery` CR by running the following command:
148152
+

modules/creating-nfd-cr-cli.adoc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
[id="creating-nfd-cr-cli_{context}"]
77
= Creating a NodeFeatureDiscovery CR by using the CLI
88

9-
As a cluster administrator, you can create a `NodeFeatureDiscovery` CR instance by using the {oc-first}.
9+
[role="_abstract"]
10+
Create a `NodeFeatureDiscovery` CR instance by using the {oc-first} to deploy the NFD operand and enable hardware feature detection on your cluster nodes.
1011

1112
[NOTE]
1213
====
@@ -17,7 +18,7 @@ The following example shows the use of `-rhel9` to acquire the correct image.
1718

1819
.Prerequisites
1920

20-
* You have access to an {product-title} cluster
21+
* You have access to an {product-title} cluster.
2122
* You installed the {oc-first}.
2223
* You logged in as a user with `cluster-admin` privileges.
2324
* You installed the NFD Operator.
@@ -38,7 +39,7 @@ spec:
3839
instance: "" # instance is empty by default
3940
topologyupdater: false # False by default
4041
operand:
41-
image: registry.redhat.io/openshift4/ose-node-feature-discovery-rhel9:v{product-version} <1>
42+
image: registry.redhat.io/openshift4/ose-node-feature-discovery-rhel9:v{product-version}
4243
imagePullPolicy: Always
4344
workerConfig:
4445
configData: |
@@ -110,7 +111,10 @@ spec:
110111
matchOn:
111112
- loadedKMod: ["example_kmod3"]
112113
----
113-
<1> The `operand.image` field is mandatory.
114+
+
115+
where:
116+
+
117+
`operand.image`:: Specifies the required operand image.
114118

115119
. Create the `NodeFeatureDiscovery` CR by running the following command:
116120
+

modules/creating-nfd-cr-web-console.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
[id="creating-nfd-cr-web-console_{context}"]
77
= Creating a NodeFeatureDiscovery CR by using the web console
88

9-
As a cluster administrator, you can create a `NodeFeatureDiscovery` CR by using the {product-title} web console.
9+
[role="_abstract"]
10+
Create a `NodeFeatureDiscovery` CR by using the {product-title} web console to deploy the NFD operand and enable hardware feature detection on your cluster nodes.
1011

1112
.Prerequisites
1213

13-
* You have access to an {product-title} cluster
14+
* You have access to an {product-title} cluster.
1415
* You logged in as a user with `cluster-admin` privileges.
1516
* You installed the NFD Operator.
1617
@@ -20,7 +21,7 @@ As a cluster administrator, you can create a `NodeFeatureDiscovery` CR by using
2021
. In the *Node Feature Discovery* section, under *Provided APIs*, click *Create instance*.
2122
. Edit the values of the `NodeFeatureDiscovery` CR.
2223
. Click *Create*.
23-
24+
+
2425
[NOTE]
2526
====
2627
Starting with version 4.12, the `operand.image` field in the `NodeFeatureDiscovery` CR is mandatory. If the NFD Operator is deployed by using {olm-first}, OLM automatically sets the `operand.image` field. If you create the `NodeFeatureDiscovery` CR by using the {product-title} CLI or the {product-title} web console, you must set the `operand.image` field explicitly.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hardware_enablement/psap-node-feature-discovery-operator.adoc
4+
5+
:_mod-docs-content-type: REFERENCE
6+
[id="nfd-configuring-core-klog_{context}"]
7+
= NFD core klog configuration parameters
8+
9+
[role="_abstract"]
10+
Configure Node Feature Discovery (NFD) logging behavior, including log verbosity, output destinations, and file rotation, to support debugging and operational monitoring.
11+
12+
The logger options can also be specified using command-line flags, which take precedence over any corresponding config file options.
13+
14+
`core.klog.addDirHeader`::
15+
If set to `true`, adds the file directory to the header of the log messages. Default: `false`. Runtime configurable: yes.
16+
17+
`core.klog.alsologtostderr`::
18+
Log to standard error as well as files. Default: `false`. Runtime configurable: yes.
19+
20+
`core.klog.logBacktraceAt`::
21+
When logging hits line `file:N`, emit a stack trace. Default: empty. Runtime configurable: yes.
22+
23+
`core.klog.logDir`::
24+
If non-empty, write log files in this directory. Default: empty. Runtime configurable: no.
25+
26+
`core.klog.logFile`::
27+
If not empty, use this log file. Default: empty. Runtime configurable: no.
28+
29+
`core.klog.logFileMaxSize`::
30+
Defines the maximum size a log file can grow to. Unit is megabytes. If the value is `0`, the maximum file size is unlimited. Default: `1800`. Runtime configurable: no.
31+
32+
`core.klog.logtostderr`::
33+
Log to standard error instead of files. Default: `true`. Runtime configurable: yes.
34+
35+
`core.klog.skipHeaders`::
36+
If set to `true`, avoid header prefixes in the log messages. Default: `false`. Runtime configurable: yes.
37+
38+
`core.klog.skipLogHeaders`::
39+
If set to `true`, avoid headers when opening log files. Default: `false`. Runtime configurable: no.
40+
41+
`core.klog.stderrthreshold`::
42+
Logs at or above this threshold go to stderr. Default: `2`. Runtime configurable: yes.
43+
44+
`core.klog.v`::
45+
Specifies the number for the log level verbosity. Default: `0`. Runtime configurable: yes.
46+
47+
`core.klog.vmodule`::
48+
Specifies a comma-separated list of `pattern=N` settings for file-filtered logging. Default: empty. Runtime configurable: yes.

modules/nfd-configuring-core.adoc

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hardware_enablement/psap-node-feature-discovery-operator.adoc
4+
5+
:_mod-docs-content-type: REFERENCE
6+
[id="nfd-configuring-core_{context}"]
7+
= NFD core configuration parameters
8+
9+
[role="_abstract"]
10+
Configure core Node Feature Discovery (NFD) settings to control feature detection intervals, label filtering, and publishing behavior across all feature sources.
11+
12+
`core.sleepInterval`::
13+
Specifies the interval between consecutive passes of feature detection or re-detection, and thus also the interval between node re-labeling. A non-positive value implies infinite sleep interval; no re-detection or re-labeling is done. This value is overridden by the deprecated `--sleep-interval` command-line flag, if specified. The default value is `60s`.
14+
+
15+
.Example usage
16+
[source,yaml]
17+
----
18+
core:
19+
sleepInterval: 60s
20+
----
21+
22+
`core.sources`::
23+
Specifies the list of enabled feature sources. A special value `all` enables all feature sources. This value is overridden by the deprecated `--sources` command-line flag, if specified. Default: `[all]`.
24+
+
25+
.Example usage
26+
[source,yaml]
27+
----
28+
core:
29+
sources:
30+
- system
31+
- custom
32+
----
33+
34+
`core.labelWhiteList`::
35+
Specifies a regular expression for filtering feature labels based on the label name. Non-matching labels are not published. The regular expression is only matched against the basename part of the label, the part of the name after '/'. The label prefix, or namespace, is omitted. This value is overridden by the deprecated `--label-whitelist` command-line flag, if specified. Default: `null`.
36+
+
37+
.Example usage
38+
[source,yaml]
39+
----
40+
core:
41+
labelWhiteList: '^cpu-cpuid'
42+
----
43+
44+
`core.noPublish`::
45+
Setting `core.noPublish` to `true` disables all communication with the `nfd-master`. It is effectively a dry run flag; `nfd-worker` runs feature detection normally, but no labeling requests are sent to `nfd-master`. This value is overridden by the `--no-publish` command-line flag, if specified. The default value is `false`.
46+
+
47+
.Example usage
48+
[source,yaml]
49+
----
50+
core:
51+
noPublish: true
52+
----
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hardware_enablement/psap-node-feature-discovery-operator.adoc
4+
5+
:_mod-docs-content-type: REFERENCE
6+
[id="nfd-configuring-sources_{context}"]
7+
= NFD sources configuration parameters
8+
9+
[role="_abstract"]
10+
Configure Node Feature Discovery (NFD) feature sources to control which CPU, kernel, PCI, USB, and custom hardware attributes are detected and published as node labels.
11+
12+
`sources.cpu.cpuid.attributeBlacklist`::
13+
Prevents publishing `cpuid` features listed in this option. This value is overridden by `sources.cpu.cpuid.attributeWhitelist`, if specified. Default: `[BMI1, BMI2, CLMUL, CMOV, CX16, ERMS, F16C, HTT, LZCNT, MMX, MMXEXT, NX, POPCNT, RDRAND, RDSEED, RDTSCP, SGX, SGXLC, SSE, SSE2, SSE3, SSE4.1, SSE4.2, SSSE3]`.
14+
+
15+
.Example usage
16+
[source,yaml]
17+
----
18+
sources:
19+
cpu:
20+
cpuid:
21+
attributeBlacklist: [MMX, MMXEXT]
22+
----
23+
24+
`sources.cpu.cpuid.attributeWhitelist`::
25+
Publishes only the `cpuid` features listed in this option. Takes precedence over `sources.cpu.cpuid.attributeBlacklist`. Default: empty.
26+
+
27+
.Example usage
28+
[source,yaml]
29+
----
30+
sources:
31+
cpu:
32+
cpuid:
33+
attributeWhitelist: [AVX512BW, AVX512CD, AVX512DQ, AVX512F, AVX512VL]
34+
----
35+
36+
`sources.kernel.kconfigFile`::
37+
Specifies the path of the kernel config file. If empty, NFD runs a search in the well-known standard locations. Default: empty.
38+
+
39+
.Example usage
40+
[source,yaml]
41+
----
42+
sources:
43+
kernel:
44+
kconfigFile: "/path/to/kconfig"
45+
----
46+
47+
`sources.kernel.configOpts`::
48+
Specifies kernel configuration options to publish as feature labels. Default: `[NO_HZ, NO_HZ_IDLE, NO_HZ_FULL, PREEMPT]`.
49+
+
50+
.Example usage
51+
[source,yaml]
52+
----
53+
sources:
54+
kernel:
55+
configOpts: [NO_HZ, X86, DMI]
56+
----
57+
58+
`sources.pci.deviceClassWhitelist`::
59+
Specifies a list of link:https://pci-ids.ucw.cz/read/PD[PCI device class IDs] for which to publish a label. It can be specified as a main class only (for example, `03`) or full class-subclass combination (for example `0300`). The former implies that all subclasses are accepted. The format of the labels can be further configured with `deviceLabelFields`. Default: `["03", "0b40", "12"]`.
60+
+
61+
.Example usage
62+
[source,yaml]
63+
----
64+
sources:
65+
pci:
66+
deviceClassWhitelist: ["0200", "03"]
67+
----
68+
69+
`sources.pci.deviceLabelFields`::
70+
Specifies the set of PCI ID fields to use when constructing the name of the feature label. Valid fields are `class`, `vendor`, `device`, `subsystem_vendor` and `subsystem_device`. Default: `[class, vendor]`.
71+
+
72+
.Example usage
73+
[source,yaml]
74+
----
75+
sources:
76+
pci:
77+
deviceLabelFields: [class, vendor, device]
78+
----
79+
+
80+
With the example config above, NFD would publish labels such as `feature.node.kubernetes.io/pci-<class-id>_<vendor-id>_<device-id>.present=true`.
81+
82+
`sources.usb.deviceClassWhitelist`::
83+
Specifies a list of USB link:https://www.usb.org/defined-class-codes[device class] IDs for which to publish a feature label. The format of the labels can be further configured with `deviceLabelFields`. Default: `["0e", "ef", "fe", "ff"]`.
84+
+
85+
.Example usage
86+
[source,yaml]
87+
----
88+
sources:
89+
usb:
90+
deviceClassWhitelist: ["ef", "ff"]
91+
----
92+
93+
`sources.usb.deviceLabelFields`::
94+
Specifies the set of USB ID fields from which to compose the name of the feature label. Valid fields are `class`, `vendor`, and `device`. Default: `[class, vendor, device]`.
95+
+
96+
.Example usage
97+
[source,yaml]
98+
----
99+
sources:
100+
pci:
101+
deviceLabelFields: [class, vendor]
102+
----
103+
+
104+
With the example config above, NFD would publish labels such as `feature.node.kubernetes.io/usb-<class-id>_<vendor-id>.present=true`.
105+
106+
`sources.custom`::
107+
Specifies the list of rules to process in the custom feature source to create user-specific labels. Default: empty.
108+
+
109+
.Example usage
110+
[source,yaml]
111+
----
112+
sources:
113+
custom:
114+
- name: "my.custom.feature"
115+
matchOn:
116+
- loadedKMod: ["e1000e"]
117+
- pciId:
118+
class: ["0200"]
119+
vendor: ["8086"]
120+
----

modules/nfd-rules-about.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[id="nfd-rules-about_{context}"]
77
= About the NodeFeatureRule custom resource
88

9-
`NodeFeatureRule` objects are a `NodeFeatureDiscovery` custom resource designed for rule-based custom labeling of nodes. Some use cases include application-specific labeling or distribution by hardware vendors to create specific labels for their devices.
9+
[role="_abstract"]
10+
`NodeFeatureRule` objects enable rule-based custom labeling of nodes, allowing vendors and application teams to create targeted labels and taints based on detected hardware features and system configuration.
1011

1112
`NodeFeatureRule` objects provide a method to create vendor- or application-specific labels and taints. It uses a flexible rule-based mechanism for creating labels and optionally taints based on node features.

0 commit comments

Comments
 (0)