mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
380 lines
10 KiB
Plaintext
380 lines
10 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * scalability_and_performance/psap-node-feature-discovery-operator.adoc
|
|
|
|
:_mod-docs-content-type: REFERENCE
|
|
[id="configuring-the-node-feature-discovery_{context}"]
|
|
= Configuring the Node Feature Discovery Operator
|
|
|
|
[id="configuring-node-feature-discovery-operator-core_{context}"]
|
|
== core
|
|
|
|
The `core` section contains common configuration settings that are not specific to any particular feature source.
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-core-sleepInterval_{context}"]
|
|
=== core.sleepInterval
|
|
|
|
`core.sleepInterval` 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.
|
|
|
|
.Example usage
|
|
[source,yaml]
|
|
----
|
|
core:
|
|
sleepInterval: 60s <1>
|
|
----
|
|
The default value is `60s`.
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-core-sources_{context}"]
|
|
=== core.sources
|
|
|
|
`core.sources` 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]`
|
|
|
|
.Example usage
|
|
[source,yaml]
|
|
----
|
|
core:
|
|
sources:
|
|
- system
|
|
- custom
|
|
----
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-core-label-whitelist_{context}"]
|
|
=== core.labelWhiteList
|
|
|
|
`core.labelWhiteList` 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`
|
|
|
|
.Example usage
|
|
[source,yaml]
|
|
----
|
|
core:
|
|
labelWhiteList: '^cpu-cpuid'
|
|
----
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-core-no-publish_{context}"]
|
|
=== core.noPublish
|
|
|
|
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.
|
|
|
|
Example:
|
|
|
|
.Example usage
|
|
[source,yaml]
|
|
----
|
|
core:
|
|
noPublish: true <1>
|
|
----
|
|
The default value is `false`.
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-core-klog_{context}"]
|
|
== core.klog
|
|
|
|
The following options specify the logger configuration, most of which can be dynamically adjusted at run-time.
|
|
|
|
The logger options can also be specified using command-line flags, which take precedence over any corresponding config file options.
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-core-klog-adddirheader_{context}"]
|
|
=== core.klog.addDirHeader
|
|
|
|
If set to `true`, `core.klog.addDirHeader` adds the file directory to the header of the log messages.
|
|
|
|
Default: `false`
|
|
|
|
Run-time configurable: yes
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-core-klog-alsologtostderr_{context}"]
|
|
=== core.klog.alsologtostderr
|
|
|
|
Log to standard error as well as files.
|
|
|
|
Default: `false`
|
|
|
|
Run-time configurable: yes
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-core-klog-BacktraceAt_{context}"]
|
|
=== core.klog.logBacktraceAt
|
|
|
|
When logging hits line file:N, emit a stack trace.
|
|
|
|
Default: *empty*
|
|
|
|
Run-time configurable: yes
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-core-klog-logdir_{context}"]
|
|
=== core.klog.logDir
|
|
|
|
If non-empty, write log files in this directory.
|
|
|
|
Default: *empty*
|
|
|
|
Run-time configurable: no
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-core-klog-logfile_{context}"]
|
|
=== core.klog.logFile
|
|
|
|
If not empty, use this log file.
|
|
|
|
Default: *empty*
|
|
|
|
Run-time configurable: no
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-core-klog-logFileMaxSize_{context}"]
|
|
=== core.klog.logFileMaxSize
|
|
|
|
`core.klog.logFileMaxSize` 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`
|
|
|
|
Run-time configurable: no
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-core-klog-logtostderr_{context}"]
|
|
=== core.klog.logtostderr
|
|
|
|
Log to standard error instead of files
|
|
|
|
Default: `true`
|
|
|
|
Run-time configurable: yes
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-core-klog-skipHeaders_{context}"]
|
|
=== core.klog.skipHeaders
|
|
|
|
If `core.klog.skipHeaders` is set to `true`, avoid header prefixes in the log messages.
|
|
|
|
Default: `false`
|
|
|
|
Run-time configurable: yes
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-core-klog-skipLogHeaders_{context}"]
|
|
=== core.klog.skipLogHeaders
|
|
|
|
If `core.klog.skipLogHeaders` is set to `true`, avoid headers when opening log files.
|
|
|
|
Default: `false`
|
|
|
|
Run-time configurable: no
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-core-klog-stderrthreshold_{context}"]
|
|
=== core.klog.stderrthreshold
|
|
|
|
Logs at or above this threshold go to stderr.
|
|
|
|
Default: `2`
|
|
|
|
Run-time configurable: yes
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-core-klog-v_{context}"]
|
|
=== core.klog.v
|
|
|
|
`core.klog.v` is the number for the log level verbosity.
|
|
|
|
Default: `0`
|
|
|
|
Run-time configurable: yes
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-core-klog-vmodule_{context}"]
|
|
=== core.klog.vmodule
|
|
|
|
`core.klog.vmodule` is a comma-separated list of `pattern=N` settings for file-filtered logging.
|
|
|
|
Default: *empty*
|
|
|
|
Run-time configurable: yes
|
|
|
|
[id="configuring-node-feature-discovery-operator-sources_{context}"]
|
|
== sources
|
|
|
|
The `sources` section contains feature source specific configuration parameters.
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-sources-cpu-cpuid-attributeBlacklist_{context}"]
|
|
=== sources.cpu.cpuid.attributeBlacklist
|
|
|
|
Prevent 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]`
|
|
|
|
.Example usage
|
|
[source,yaml]
|
|
----
|
|
sources:
|
|
cpu:
|
|
cpuid:
|
|
attributeBlacklist: [MMX, MMXEXT]
|
|
----
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-sources-cpu-cpuid-attributeWhitelist_{context}"]
|
|
=== sources.cpu.cpuid.attributeWhitelist
|
|
|
|
Only publish the `cpuid` features listed in this option.
|
|
|
|
`sources.cpu.cpuid.attributeWhitelist` takes precedence over `sources.cpu.cpuid.attributeBlacklist`.
|
|
|
|
Default: *empty*
|
|
|
|
.Example usage
|
|
[source,yaml]
|
|
----
|
|
sources:
|
|
cpu:
|
|
cpuid:
|
|
attributeWhitelist: [AVX512BW, AVX512CD, AVX512DQ, AVX512F, AVX512VL]
|
|
----
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-sources-kernel-kconfigFilet_{context}"]
|
|
=== sources.kernel.kconfigFile
|
|
|
|
`sources.kernel.kconfigFile` is the path of the kernel config file. If empty, NFD runs a search in the well-known standard locations.
|
|
|
|
Default: *empty*
|
|
|
|
.Example usage
|
|
[source,yaml]
|
|
----
|
|
sources:
|
|
kernel:
|
|
kconfigFile: "/path/to/kconfig"
|
|
----
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-sources-kernel-configOpts_{context}"]
|
|
=== sources.kernel.configOpts
|
|
|
|
`sources.kernel.configOpts` represents kernel configuration options to publish as feature labels.
|
|
|
|
Default: `[NO_HZ, NO_HZ_IDLE, NO_HZ_FULL, PREEMPT]`
|
|
|
|
.Example usage
|
|
[source,yaml]
|
|
----
|
|
sources:
|
|
kernel:
|
|
configOpts: [NO_HZ, X86, DMI]
|
|
----
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-sources-pci-deviceClassWhitelist_{context}"]
|
|
=== sources.pci.deviceClassWhitelist
|
|
|
|
`sources.pci.deviceClassWhitelist` is 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"]`
|
|
|
|
.Example usage
|
|
[source,yaml]
|
|
----
|
|
sources:
|
|
pci:
|
|
deviceClassWhitelist: ["0200", "03"]
|
|
----
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-sources-pci-deviceLabelFields_{context}"]
|
|
=== sources.pci.deviceLabelFields
|
|
|
|
`sources.pci.deviceLabelFields` is 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]`
|
|
|
|
.Example usage
|
|
[source,yaml]
|
|
----
|
|
sources:
|
|
pci:
|
|
deviceLabelFields: [class, vendor, device]
|
|
----
|
|
|
|
With the example config above, NFD would publish labels such as `feature.node.kubernetes.io/pci-<class-id>_<vendor-id>_<device-id>.present=true`
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-sources-usb-deviceClassWhitelist_{context}"]
|
|
=== sources.usb.deviceClassWhitelist
|
|
|
|
`sources.usb.deviceClassWhitelist` is 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"]`
|
|
|
|
.Example usage
|
|
[source,yaml]
|
|
----
|
|
sources:
|
|
usb:
|
|
deviceClassWhitelist: ["ef", "ff"]
|
|
----
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-sources-usb-deviceLabelFields_{context}"]
|
|
=== sources.usb.deviceLabelFields
|
|
|
|
`sources.usb.deviceLabelFields` is 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]`
|
|
|
|
.Example usage
|
|
[source,yaml]
|
|
----
|
|
sources:
|
|
pci:
|
|
deviceLabelFields: [class, vendor]
|
|
----
|
|
|
|
With the example config above, NFD would publish labels like: `feature.node.kubernetes.io/usb-<class-id>_<vendor-id>.present=true`.
|
|
|
|
[discrete]
|
|
[id="configuring-node-feature-discovery-operator-sources-custom_{context}"]
|
|
=== sources.custom
|
|
|
|
`sources.custom` is the list of rules to process in the custom feature source to create user-specific labels.
|
|
|
|
Default: *empty*
|
|
|
|
.Example usage
|
|
[source,yaml]
|
|
----
|
|
source:
|
|
custom:
|
|
- name: "my.custom.feature"
|
|
matchOn:
|
|
- loadedKMod: ["e1000e"]
|
|
- pciId:
|
|
class: ["0200"]
|
|
vendor: ["8086"]
|
|
----
|