See the sample configuration file for a full example configuration.
The core
section contains common configuration settings that are not specific to any particular feature source.
core.sleepInterval
specifies the interval between consecutive passes of feature (re-)detection, and thus also the interval between node re-labeling. A non-positive value implies infinite sleep interval, i.e. no re-detection or re-labeling is done.
Note: Overridden by the deprecated --sleep-interval
command line flag (if specified).
Default: 60s
Example:
core:
sleepInterval: 60s
core.sources
specifies the list of enabled feature sources. A special value all
enables all feature sources.
Note: Overridden by the deprecated --sources
command line flag (if specified).
Default: [all]
Example:
core:
sources:
- system
- custom
core.labelWhiteList
specifies a regular expression for filtering feature labels based on the label name. Non-matching labels are not published.
Note: The regular expression is only matches against the "basename" part of the label, i.e. to the part of the name after ‘/'. The label prefix (or namespace) is omitted.
Note: Overridden by the deprecated --label-whitelist
command line flag (if specified).
Default: null
Example:
core:
labelWhiteList: '^cpu-cpuid'
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.
Note: Overridden by the --no-publish
command line flag (if specified).
Default: false
Example:
core:
noPublish: true
The following options specify the logger configuration. Most of which can be dynamically adjusted at run-time.
Note: The logger options can also be specified via command line flags which take precedence over any corresponding config file options.
If true, adds the file directory to the header of the log messages.
Default: false
Run-time configurable: yes
Log to standard error as well as files.
Default: false
Run-time configurable: yes
When logging hits line file:N, emit a stack trace.
Default: empty
Run-time configurable: yes
If non-empty, write log files in this directory.
Default: empty
Run-time configurable: no
If non-empty, use this log file.
Default: empty
Run-time configurable: no
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
Log to standard error instead of files
Default: true
Run-time configurable: yes
If true, avoid header prefixes in the log messages.
Default: false
Run-time configurable: yes
If true, avoid headers when opening log files.
Default: false
Run-time configurable: no
Logs at or above this threshold go to stderr (default 2)
Run-time configurable: yes
Number for the log level verbosity.
Default: 0
Run-time configurable: yes
Comma-separated list of pattern=N
settings for file-filtered logging.
Default: empty
Run-time configurable: yes
The sources
section contains feature source specific configuration parameters.
Prevent publishing cpuid features listed in this option.
Note: 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:
sources:
cpu:
cpuid:
attributeBlacklist: [MMX, MMXEXT]
Only publish the cpuid features listed in this option.
Note: takes precedence over sources.cpu.cpuid.attributeBlacklist
Default: empty
Example:
sources:
cpu:
cpuid:
attributeWhitelist: [AVX512BW, AVX512CD, AVX512DQ, AVX512F, AVX512VL]
Path of the kernel config file. If empty, NFD runs a search in the well-known standard locations.
Default: empty
Example:
sources:
kernel:
kconfigFile: "/path/to/kconfig"
Kernel configuration options to publish as feature labels.
Default: [NO_HZ, NO_HZ_IDLE, NO_HZ_FULL, PREEMPT]
Example:
sources:
kernel:
configOpts: [NO_HZ, X86, DMI]
List of PCI device class IDs for which to publish a label. Can be specified as a main class only (e.g. 03
) or full class-subclass combination (e.g. 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:
sources:
pci:
deviceClassWhitelist: ["0200", "03"]
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:
sources:
pci:
deviceLabelFields: [class, vendor, device]
With the example config above NFD would publish labels like: feature.node.kubernetes.io/pci-<class-id>_<vendor-id>_<device-id>.present=true
List of USB 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:
sources:
usb:
deviceClassWhitelist: ["ef", "ff"]
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:
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
List of rules to process in the custom feature source to create user-specific labels. Refer to the documentation of the custom feature source for details of the available rules and their configuration.
Default: empty
Example:
source:
custom:
- name: "my.custom.feature"
matchOn:
- loadedKMod: ["e1000e"]
- pciId:
class: ["0200"]
vendor: ["8086"]