|
| 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 | +---- |
0 commit comments