mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
45181635f5
Auto-generated from v0.13.5-8-gbf367dc4 by 'update-gh-pages.sh'
1 line
No EOL
349 KiB
JSON
1 line
No EOL
349 KiB
JSON
[{"title":"Feature labels","layout":"default","sort":1,"content":"<h1 class=\"no_toc\" id=\"feature-labels\">Feature labels</h1>\n\n<h2 class=\"no_toc text-delta\" id=\"table-of-contents\">Table of contents</h2>\n\n<ol id=\"markdown-toc\">\n <li><a href=\"#built-in-labels\" id=\"markdown-toc-built-in-labels\">Built-in labels</a> <ol>\n <li><a href=\"#cpu\" id=\"markdown-toc-cpu\">CPU</a></li>\n <li><a href=\"#kernel\" id=\"markdown-toc-kernel\">Kernel</a></li>\n <li><a href=\"#memory\" id=\"markdown-toc-memory\">Memory</a></li>\n <li><a href=\"#network\" id=\"markdown-toc-network\">Network</a></li>\n <li><a href=\"#pci\" id=\"markdown-toc-pci\">PCI</a></li>\n <li><a href=\"#usb\" id=\"markdown-toc-usb\">USB</a></li>\n <li><a href=\"#storage\" id=\"markdown-toc-storage\">Storage</a></li>\n <li><a href=\"#system\" id=\"markdown-toc-system\">System</a></li>\n <li><a href=\"#custom\" id=\"markdown-toc-custom\">Custom</a></li>\n </ol>\n </li>\n <li><a href=\"#user-defined-labels\" id=\"markdown-toc-user-defined-labels\">User defined labels</a></li>\n <li><a href=\"#extended-resources\" id=\"markdown-toc-extended-resources\">Extended resources</a></li>\n</ol>\n\n<hr />\n\n<p>Features are advertised as labels in the Kubernetes Node object.</p>\n\n<h2 id=\"built-in-labels\">Built-in labels</h2>\n\n<p>Label creation in nfd-worker is performed by a set of separate modules called\nlabel sources. The\n<a href=\"/node-feature-discovery/v0.13/reference/worker-configuration-reference.html#corelabelsources\"><code class=\"language-plaintext highlighter-rouge\">core.labelSources</code></a>\nconfiguration option (or\n<a href=\"/node-feature-discovery/v0.13/reference/worker-commandline-reference.html#-label-sources\"><code class=\"language-plaintext highlighter-rouge\">-label-sources</code></a>\nflag) of nfd-worker controls which sources to enable for label generation.</p>\n\n<p>All built-in labels use the <code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io</code> label namespace and\nhave the following format.</p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>feature.node.kubernetes.io/<feature> = <value>\n</code></pre> </div></div>\n\n<blockquote>\n <p>NOTE: Consecutive runs of nfd-worker will update the labels on a\ngiven node. If features are not discovered on a consecutive run, the corresponding\nlabel will be removed. This includes any restrictions placed on the consecutive run,\nsuch as restricting discovered features with the\n<a href=\"/node-feature-discovery/v0.13/reference/master-commandline-reference.html#-label-whitelist\"><code class=\"language-plaintext highlighter-rouge\">-label-whitelist</code></a>\nflag of nfd-master or\n<a href=\"/node-feature-discovery/v0.13/reference/worker-configuration-reference.html#corelabelwhitelist\"><code class=\"language-plaintext highlighter-rouge\">core.labelWhiteList</code></a>\noption of nfd-worker.</p>\n</blockquote>\n\n<h3 id=\"cpu\">CPU</h3>\n\n<table>\n <thead>\n <tr>\n <th>Feature name</th>\n <th>Value</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-cpuid.<cpuid-flag></code></strong></td>\n <td>true</td>\n <td>CPU capability is supported. <strong>NOTE:</strong> the capability might be supported but not enabled.</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-hardware_multithreading</code></strong></td>\n <td>true</td>\n <td>Hardware multithreading, such as Intel HTT, enabled (number of logical CPUs is greater than physical CPUs)</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-coprocessor.nx_gzip</code></strong></td>\n <td>true</td>\n <td>Nest Accelerator for GZIP is supported(Power).</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-power.sst_bf.enabled</code></strong></td>\n <td>true</td>\n <td>Intel SST-BF (<a href=\"https://www.intel.com/content/www/us/en/architecture-and-technology/speed-select-technology-article.html\">Intel Speed Select Technology</a> - Base frequency) enabled</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-pstate.status</code></strong></td>\n <td>string</td>\n <td>The status of the <a href=\"https://www.kernel.org/doc/Documentation/cpu-freq/intel-pstate.txt\">Intel pstate</a> driver when in use and enabled, either ‘active’ or ‘passive’.</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-pstate.turbo</code></strong></td>\n <td>bool</td>\n <td>Set to ‘true’ if turbo frequencies are enabled in Intel pstate driver, set to ‘false’ if they have been disabled.</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-pstate.scaling_governor</code></strong></td>\n <td>string</td>\n <td>The value of the Intel pstate scaling_governor when in use, either ‘powersave’ or ‘performance’.</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-cstate.enabled</code></strong></td>\n <td>bool</td>\n <td>Set to ‘true’ if cstates are set in the intel_idle driver, otherwise set to ‘false’. Unset if intel_idle cpuidle driver is not active.</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-rdt.<rdt-flag></code></strong></td>\n <td>true</td>\n <td><strong>DEPRECATED</strong> <a href=\"http://www.intel.com/content/www/us/en/architecture-and-technology/resource-director-technology.html\">Intel RDT</a> capability is supported. See <a href=\"/node-feature-discovery/v0.13/usage/customization-guide.html#intel-rdt-flags\">RDT flags</a> for details.</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-security.sgx.enabled</code></strong></td>\n <td>true</td>\n <td>Set to ‘true’ if Intel SGX is enabled in BIOS (based on a non-zero sum value of SGX EPC section sizes).</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-security.se.enabled</code></strong></td>\n <td>true</td>\n <td>Set to ‘true’ if IBM Secure Execution for Linux (IBM Z & LinuxONE) is available and enabled (requires <code class=\"language-plaintext highlighter-rouge\">/sys/firmware/uv/prot_virt_host</code> facility)</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-security.tdx.enabled</code></strong></td>\n <td>true</td>\n <td>Set to ‘true’ if Intel TDX is available on the host and has been enabled (requires <code class=\"language-plaintext highlighter-rouge\">/sys/module/kvm_intel/parameters/tdx</code>).</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-security.sev.enabled</code></strong></td>\n <td>true</td>\n <td>Set to ‘true’ if ADM SEV is available on the host and has been enabled (requires <code class=\"language-plaintext highlighter-rouge\">/sys/module/kvm_amd/parameters/sev</code>).</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-security.sev.es.enabled</code></strong></td>\n <td>true</td>\n <td>Set to ‘true’ if ADM SEV-ES is available on the host and has been enabled (requires <code class=\"language-plaintext highlighter-rouge\">/sys/module/kvm_amd/parameters/sev_es</code>).</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-security.sev.snp.enabled</code></strong></td>\n <td>true</td>\n <td>Set to ‘true’ if ADM SEV-SNP is available on the host and has been enabled (requires <code class=\"language-plaintext highlighter-rouge\">/sys/module/kvm_amd/parameters/sev_snp</code>).</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-security.sex.asids</code></strong></td>\n <td>int</td>\n <td>The total amount of AMD SEV address-space identifiers (ASIDs), based on the <code class=\"language-plaintext highlighter-rouge\">/sys/fs/cgroup/misc.capacity</code> information.</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-security.sex.encrypted_state_ids</code></strong></td>\n <td>int</td>\n <td>The total amount of AMD SEV-ES and SEV-SNP supported, based on the <code class=\"language-plaintext highlighter-rouge\">/sys/fs/cgroup/misc.capacity</code> information.</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-sgx.enabled</code></strong></td>\n <td>true</td>\n <td><strong>DEPRECATED</strong>: use <strong><code class=\"language-plaintext highlighter-rouge\">cpu-security.sgx.enabled</code></strong> instead.</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-se.enabled</code></strong></td>\n <td>true</td>\n <td><strong>DEPRECATED</strong>: use <strong><code class=\"language-plaintext highlighter-rouge\">cpu-security.se.enabled</code></strong> instead.</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-model.vendor_id</code></strong></td>\n <td>string</td>\n <td>Comparable CPU vendor ID.</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-model.family</code></strong></td>\n <td>int</td>\n <td>CPU family.</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu-model.id</code></strong></td>\n <td>int</td>\n <td>CPU model number.</td>\n </tr>\n </tbody>\n</table>\n\n<blockquote>\n <p>NOTE: the <code class=\"language-plaintext highlighter-rouge\">cpu-rdt.<rdt-flag></code> labels are deprecated and will be removed in a\nfuture release. They will remain to be available as features\nfor <a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#nodefeaturerule\">NodeFeatureRule</a> to consume.\nSee <a href=\"/node-feature-discovery/v0.13/usage/customization-guide.html#nodefeaturerule-custom-resource\">customization guide</a>\nfor details how to use NodeFeatureRule objects to create labels.</p>\n</blockquote>\n\n<p>The CPU label source is configurable, see\n<a href=\"/node-feature-discovery/v0.13/usage/nfd-worker.html#worker-configuration\">worker configuration</a> and\n<a href=\"/node-feature-discovery/v0.13/reference/worker-configuration-reference.html#sourcescpu\"><code class=\"language-plaintext highlighter-rouge\">sources.cpu</code></a>\nconfiguration options for details.</p>\n\n<h4 id=\"x86-cpuid-flags-partial-list\">X86 CPUID flags (partial list)</h4>\n\n<table>\n <thead>\n <tr>\n <th>Flag</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>ADX</td>\n <td>Multi-Precision Add-Carry Instruction Extensions (ADX)</td>\n </tr>\n <tr>\n <td>AESNI</td>\n <td>Advanced Encryption Standard (AES) New Instructions (AES-NI)</td>\n </tr>\n <tr>\n <td>AVX</td>\n <td>Advanced Vector Extensions (AVX)</td>\n </tr>\n <tr>\n <td>AVX2</td>\n <td>Advanced Vector Extensions 2 (AVX2)</td>\n </tr>\n <tr>\n <td>AVXVNNI</td>\n <td>AVX (VEX encoded) VNNI neural network instructions</td>\n </tr>\n <tr>\n <td>AMXBF16</td>\n <td>Advanced Matrix Extension, tile multiplication operations on BFLOAT16 numbers</td>\n </tr>\n <tr>\n <td>AMXINT8</td>\n <td>Advanced Matrix Extension, tile multiplication operations on 8-bit integers</td>\n </tr>\n <tr>\n <td>AMXFP16</td>\n <td>Advanced Matrix Extension, tile multiplication operations on FP16 numbers</td>\n </tr>\n <tr>\n <td>AMXTILE</td>\n <td>Advanced Matrix Extension, base tile architecture support</td>\n </tr>\n <tr>\n <td>AVX512BF16</td>\n <td>AVX-512 BFLOAT16 instructions</td>\n </tr>\n <tr>\n <td>AVX512BITALG</td>\n <td>AVX-512 bit Algorithms</td>\n </tr>\n <tr>\n <td>AVX512BW</td>\n <td>AVX-512 byte and word Instructions</td>\n </tr>\n <tr>\n <td>AVX512CD</td>\n <td>AVX-512 conflict detection instructions</td>\n </tr>\n <tr>\n <td>AVX512DQ</td>\n <td>AVX-512 doubleword and quadword instructions</td>\n </tr>\n <tr>\n <td>AVX512ER</td>\n <td>AVX-512 exponential and reciprocal instructions</td>\n </tr>\n <tr>\n <td>AVX512F</td>\n <td>AVX-512 foundation</td>\n </tr>\n <tr>\n <td>AVX512FP16</td>\n <td>AVX-512 FP16 instructions</td>\n </tr>\n <tr>\n <td>AVX512IFMA</td>\n <td>AVX-512 integer fused multiply-add instructions</td>\n </tr>\n <tr>\n <td>AVX512PF</td>\n <td>AVX-512 prefetch instructions</td>\n </tr>\n <tr>\n <td>AVX512VBMI</td>\n <td>AVX-512 vector bit manipulation instructions</td>\n </tr>\n <tr>\n <td>AVX512VBMI2</td>\n <td>AVX-512 vector bit manipulation instructions, version 2</td>\n </tr>\n <tr>\n <td>AVX512VL</td>\n <td>AVX-512 vector length extensions</td>\n </tr>\n <tr>\n <td>AVX512VNNI</td>\n <td>AVX-512 vector neural network instructions</td>\n </tr>\n <tr>\n <td>AVX512VP2INTERSECT</td>\n <td>AVX-512 intersect for D/Q</td>\n </tr>\n <tr>\n <td>AVX512VPOPCNTDQ</td>\n <td>AVX-512 vector population count doubleword and quadword</td>\n </tr>\n <tr>\n <td>AVXIFMA</td>\n <td>AVX-IFMA instructions</td>\n </tr>\n <tr>\n <td>AVXNECONVERT</td>\n <td>AVX-NE-CONVERT instructions</td>\n </tr>\n <tr>\n <td>AVXVNNIINT8</td>\n <td>AVX-VNNI-INT8 instructions</td>\n </tr>\n <tr>\n <td>CMPCCXADD</td>\n <td>CMPCCXADD instructions</td>\n </tr>\n <tr>\n <td>ENQCMD</td>\n <td>Enqueue Command</td>\n </tr>\n <tr>\n <td>GFNI</td>\n <td>Galois Field New Instructions</td>\n </tr>\n <tr>\n <td>HYPERVISOR</td>\n <td>Running under hypervisor</td>\n </tr>\n <tr>\n <td>MSRLIST</td>\n <td>Read/Write List of Model Specific Registers</td>\n </tr>\n <tr>\n <td>PREFETCHI</td>\n <td>PREFETCHIT0/1 instructions</td>\n </tr>\n <tr>\n <td>VAES</td>\n <td>AVX-512 vector AES instructions</td>\n </tr>\n <tr>\n <td>VPCLMULQDQ</td>\n <td>Carry-less multiplication quadword</td>\n </tr>\n <tr>\n <td>WRMSRNS</td>\n <td>Non-Serializing Write to Model Specific Register</td>\n </tr>\n </tbody>\n</table>\n\n<p>By default, the following CPUID flags have been blacklisted: BMI1, BMI2, CLMUL,\nCMOV, CX16, ERMS, F16C, HTT, LZCNT, MMX, MMXEXT, NX, POPCNT, RDRAND, RDSEED,\nRDTSCP, SGX, SSE, SSE2, SSE3, SSE4, SSE42 and SSSE3. See\n<a href=\"/node-feature-discovery/v0.13/reference/worker-configuration-reference.html#sourcescpu\"><code class=\"language-plaintext highlighter-rouge\">sources.cpu</code></a>\nconfiguration options to change the behavior.</p>\n\n<p>See the full list in <a href=\"https://github.com/klauspost/cpuid#x86-cpu-instructions\">github.com/klauspost/cpuid</a>.</p>\n\n<h4 id=\"arm-cpuid-flags-partial-list\">Arm CPUID flags (partial list)</h4>\n\n<table>\n <thead>\n <tr>\n <th>Flag</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>IDIVA</td>\n <td>Integer divide instructions available in ARM mode</td>\n </tr>\n <tr>\n <td>IDIVT</td>\n <td>Integer divide instructions available in Thumb mode</td>\n </tr>\n <tr>\n <td>THUMB</td>\n <td>Thumb instructions</td>\n </tr>\n <tr>\n <td>FASTMUL</td>\n <td>Fast multiplication</td>\n </tr>\n <tr>\n <td>VFP</td>\n <td>Vector floating point instruction extension (VFP)</td>\n </tr>\n <tr>\n <td>VFPv3</td>\n <td>Vector floating point extension v3</td>\n </tr>\n <tr>\n <td>VFPv4</td>\n <td>Vector floating point extension v4</td>\n </tr>\n <tr>\n <td>VFPD32</td>\n <td>VFP with 32 D-registers</td>\n </tr>\n <tr>\n <td>HALF</td>\n <td>Half-word loads and stores</td>\n </tr>\n <tr>\n <td>EDSP</td>\n <td>DSP extensions</td>\n </tr>\n <tr>\n <td>NEON</td>\n <td>NEON SIMD instructions</td>\n </tr>\n <tr>\n <td>LPAE</td>\n <td>Large Physical Address Extensions</td>\n </tr>\n </tbody>\n</table>\n\n<h4 id=\"arm64-cpuid-flags-partial-list\">Arm64 CPUID flags (partial list)</h4>\n\n<table>\n <thead>\n <tr>\n <th>Flag</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>AES</td>\n <td>Announcing the Advanced Encryption Standard</td>\n </tr>\n <tr>\n <td>EVSTRM</td>\n <td>Event Stream Frequency Features</td>\n </tr>\n <tr>\n <td>FPHP</td>\n <td>Half Precision(16bit) Floating Point Data Processing Instructions</td>\n </tr>\n <tr>\n <td>ASIMDHP</td>\n <td>Half Precision(16bit) Asimd Data Processing Instructions</td>\n </tr>\n <tr>\n <td>ATOMICS</td>\n <td>Atomic Instructions to the A64</td>\n </tr>\n <tr>\n <td>ASIMRDM</td>\n <td>Support for Rounding Double Multiply Add/Subtract</td>\n </tr>\n <tr>\n <td>PMULL</td>\n <td>Optional Cryptographic and CRC32 Instructions</td>\n </tr>\n <tr>\n <td>JSCVT</td>\n <td>Perform Conversion to Match Javascript</td>\n </tr>\n <tr>\n <td>DCPOP</td>\n <td>Persistent Memory Support</td>\n </tr>\n </tbody>\n</table>\n\n<h3 id=\"kernel\">Kernel</h3>\n\n<table>\n <thead>\n <tr>\n <th>Feature</th>\n <th>Value</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">kernel-config.<option></code></strong></td>\n <td>true</td>\n <td>Kernel config option is enabled (set ‘y’ or ‘m’). Default options are <code class=\"language-plaintext highlighter-rouge\">NO_HZ</code>, <code class=\"language-plaintext highlighter-rouge\">NO_HZ_IDLE</code>, <code class=\"language-plaintext highlighter-rouge\">NO_HZ_FULL</code> and <code class=\"language-plaintext highlighter-rouge\">PREEMPT</code></td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">kernel-selinux.enabled</code></strong></td>\n <td>true</td>\n <td>Selinux is enabled on the node</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">kernel-version.full</code></strong></td>\n <td>string</td>\n <td>Full kernel version as reported by <code class=\"language-plaintext highlighter-rouge\">/proc/sys/kernel/osrelease</code> (e.g. ‘4.5.6-7-g123abcde’)</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">kernel-version.major</code></strong></td>\n <td>string</td>\n <td>First component of the kernel version (e.g. ‘4’)</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">kernel-version.minor</code></strong></td>\n <td>string</td>\n <td>Second component of the kernel version (e.g. ‘5’)</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">kernel-version.revision</code></strong></td>\n <td>string</td>\n <td>Third component of the kernel version (e.g. ‘6’)</td>\n </tr>\n </tbody>\n</table>\n\n<p>The kernel label source is configurable, see\n<a href=\"/node-feature-discovery/v0.13/usage/nfd-worker.html#worker-configuration\">worker configuration</a> and\n<a href=\"/node-feature-discovery/v0.13/reference/worker-configuration-reference.html#sourceskernel\"><code class=\"language-plaintext highlighter-rouge\">sources.kernel</code></a>\nconfiguration options for details.</p>\n\n<h3 id=\"memory\">Memory</h3>\n\n<table>\n <thead>\n <tr>\n <th>Feature</th>\n <th>Value</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">memory-numa</code></strong></td>\n <td>true</td>\n <td>Multiple memory nodes i.e. NUMA architecture detected</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">memory-nv.present</code></strong></td>\n <td>true</td>\n <td>NVDIMM device(s) are present</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">memory-nv.dax</code></strong></td>\n <td>true</td>\n <td>NVDIMM region(s) configured in DAX mode are present</td>\n </tr>\n </tbody>\n</table>\n\n<h3 id=\"network\">Network</h3>\n\n<table>\n <thead>\n <tr>\n <th>Feature</th>\n <th>Value</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">network-sriov.capable</code></strong></td>\n <td>true</td>\n <td><a href=\"http://www.intel.com/content/www/us/en/pci-express/pci-sig-sr-iov-primer-sr-iov-technology-paper.html\">Single Root Input/Output Virtualization</a> (SR-IOV) enabled Network Interface Card(s) present</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">network-sriov.configured</code></strong></td>\n <td>true</td>\n <td>SR-IOV virtual functions have been configured</td>\n </tr>\n </tbody>\n</table>\n\n<h3 id=\"pci\">PCI</h3>\n\n<table>\n <thead>\n <tr>\n <th>Feature</th>\n <th>Value</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">pci-<device label>.present</code></strong></td>\n <td>true</td>\n <td>PCI device is detected</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">pci-<device label>.sriov.capable</code></strong></td>\n <td>true</td>\n <td><a href=\"http://www.intel.com/content/www/us/en/pci-express/pci-sig-sr-iov-primer-sr-iov-technology-paper.html\">Single Root Input/Output Virtualization</a> (SR-IOV) enabled PCI device present</td>\n </tr>\n </tbody>\n</table>\n\n<p><code class=\"language-plaintext highlighter-rouge\"><device label></code> is format is configurable and set to <code class=\"language-plaintext highlighter-rouge\"><class>_<vendor></code> by\ndefault. For more more details about configuration of the pci labels, see\n<a href=\"/node-feature-discovery/v0.13/reference/worker-configuration-reference.html#sourcespci\"><code class=\"language-plaintext highlighter-rouge\">sources.pci</code></a> options\nand <a href=\"/node-feature-discovery/v0.13/usage/nfd-worker.html#worker-configuration\">worker configuration</a>\ninstructions.</p>\n\n<h3 id=\"usb\">USB</h3>\n\n<table>\n <thead>\n <tr>\n <th>Feature</th>\n <th>Value</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">usb-<device label>.present</code></strong></td>\n <td>true</td>\n <td>USB device is detected</td>\n </tr>\n </tbody>\n</table>\n\n<p><code class=\"language-plaintext highlighter-rouge\"><device label></code> is format is configurable and set to\n<code class=\"language-plaintext highlighter-rouge\"><class>_<vendor>_<device></code> by default. For more more details about\nconfiguration of the usb labels, see\n<a href=\"/node-feature-discovery/v0.13/reference/worker-configuration-reference.html#sourcesusb\"><code class=\"language-plaintext highlighter-rouge\">sources.usb</code></a> options\nand <a href=\"/node-feature-discovery/v0.13/usage/nfd-worker.html#worker-configuration\">worker configuration</a>\ninstructions.</p>\n\n<h3 id=\"storage\">Storage</h3>\n\n<table>\n <thead>\n <tr>\n <th>Feature</th>\n <th>Value</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">storage-nonrotationaldisk</code></strong></td>\n <td>true</td>\n <td>Non-rotational disk, like SSD, is present in the node</td>\n </tr>\n </tbody>\n</table>\n\n<h3 id=\"system\">System</h3>\n\n<table>\n <thead>\n <tr>\n <th>Feature</th>\n <th>Value</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">system-os_release.ID</code></strong></td>\n <td>string</td>\n <td>Operating system identifier</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">system-os_release.VERSION_ID</code></strong></td>\n <td>string</td>\n <td>Operating system version identifier (e.g. ‘6.7’)</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">system-os_release.VERSION_ID.major</code></strong></td>\n <td>string</td>\n <td>First component of the OS version id (e.g. ‘6’)</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">system-os_release.VERSION_ID.minor</code></strong></td>\n <td>string</td>\n <td>Second component of the OS version id (e.g. ‘7’)</td>\n </tr>\n </tbody>\n</table>\n\n<h3 id=\"custom\">Custom</h3>\n\n<p>The custom label source is designed for creating\n<a href=\"#user-defined-labels\">user defined labels</a>. However, it has a few statically\ndefined built-in labels:</p>\n\n<table>\n <thead>\n <tr>\n <th>Feature</th>\n <th>Value</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">custom-rdma.capable</code></strong></td>\n <td>true</td>\n <td>The node has an RDMA capable Network adapter</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">custom-rdma.enabled</code></strong></td>\n <td>true</td>\n <td>The node has the needed RDMA modules loaded to run RDMA traffic</td>\n </tr>\n </tbody>\n</table>\n\n<h2 id=\"user-defined-labels\">User defined labels</h2>\n\n<p>NFD has many extension points for creating vendor and application specific\nlabels. See the <a href=\"customization-guide\">customization guide</a> for\ndetailed documentation.</p>\n\n<h2 id=\"extended-resources\">Extended resources</h2>\n\n<p>This feature is experimental and by no means a replacement for the usage of\ndevice plugins.</p>\n\n<p>Labels which have integer values, can be promoted to Kubernetes extended\nresources by listing them to the master <code class=\"language-plaintext highlighter-rouge\">-resource-labels</code> command line flag.\nThese labels won’t then show in the node label section, they will appear only\nas extended resources.</p>\n\n<p>An example use-case for the extended resources could be based on a hook which\ncreates a label for the node SGX EPC memory section size. By giving the name of\nthat label in the <code class=\"language-plaintext highlighter-rouge\">-resource-labels</code> flag, that value will then turn into an\nextended resource of the node, allowing PODs to request that resource and the\nKubernetes scheduler to schedule such PODs to only those nodes which have a\nsufficient capacity of said resource left.</p>\n\n<p>Similar to labels, the default namespace <code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io</code> is\nautomatically prefixed to the extended resource, if the promoted label doesn’t\nhave a namespace.</p>\n\n<p>Example usage of the command line arguments, using a new namespace:\n<code class=\"language-plaintext highlighter-rouge\">nfd-master -resource-labels=my_source-my.feature,sgx.some.ns/epc -extra-label-ns=sgx.some.ns</code></p>\n\n<p>The above would result in following extended resources provided that related\nlabels exist:</p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> sgx.some.ns/epc: <label value>\n feature.node.kubernetes.io/my_source-my.feature: <label value>\n</code></pre> </div></div>\n\n<!-- Links -->\n","dir":"/usage/","name":"features.md","path":"usage/features.md","url":"/usage/features.html"},{"title":"Get started","layout":"default","sort":1,"content":"<h1 id=\"node-feature-discovery\">Node Feature Discovery</h1>\n\n<p>Welcome to Node Feature Discovery – a Kubernetes add-on for detecting hardware\nfeatures and system configuration!</p>\n\n<p>Continue to:</p>\n\n<ul>\n <li>\n <p><strong><a href=\"introduction\">Introduction</a></strong> for more details on the\nproject.</p>\n </li>\n <li>\n <p><strong><a href=\"quick-start\">Quick start</a></strong> for quick step-by-step\ninstructions on how to get NFD running on your cluster.</p>\n </li>\n</ul>\n\n<h2 id=\"quick-start--the-short-short-version\">Quick-start – the short-short version</h2>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nv\">$ </span>kubectl apply <span class=\"nt\">-k</span> https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref<span class=\"o\">=</span>v0.13.6\n namespace/node-feature-discovery created\n serviceaccount/nfd-master created\n clusterrole.rbac.authorization.k8s.io/nfd-master created\n clusterrolebinding.rbac.authorization.k8s.io/nfd-master created\n configmap/nfd-worker-conf created\n service/nfd-master created\n deployment.apps/nfd-master created\n daemonset.apps/nfd-worker created\n\n<span class=\"nv\">$ </span>kubectl <span class=\"nt\">-n</span> node-feature-discovery get all\n NAME READY STATUS RESTARTS AGE\n pod/nfd-master-555458dbbc-sxg6w 1/1 Running 0 56s\n pod/nfd-worker-mjg9f 1/1 Running 0 17s\n...\n\n<span class=\"nv\">$ </span>kubectl get nodes <span class=\"nt\">-o</span> json | jq .items[].metadata.labels\n <span class=\"o\">{</span>\n <span class=\"s2\">\"kubernetes.io/arch\"</span>: <span class=\"s2\">\"amd64\"</span>,\n <span class=\"s2\">\"kubernetes.io/os\"</span>: <span class=\"s2\">\"linux\"</span>,\n <span class=\"s2\">\"feature.node.kubernetes.io/cpu-cpuid.ADX\"</span>: <span class=\"s2\">\"true\"</span>,\n <span class=\"s2\">\"feature.node.kubernetes.io/cpu-cpuid.AESNI\"</span>: <span class=\"s2\">\"true\"</span>,\n...\n\n</code></pre> </div></div>\n","dir":"/get-started/","name":"index.md","path":"get-started/index.md","url":"/get-started/"},{"title":"Image variants","layout":"default","sort":1,"content":"<h1 class=\"no_toc\" id=\"image-variants\">Image variants</h1>\n\n<h2 class=\"no_toc text-delta\" id=\"table-of-contents\">Table of contents</h2>\n\n<ol id=\"markdown-toc\">\n <li><a href=\"#minimal\" id=\"markdown-toc-minimal\">Minimal</a></li>\n <li><a href=\"#full\" id=\"markdown-toc-full\">Full</a></li>\n</ol>\n\n<hr />\n\n<p>NFD currently offers two variants of the container image. The “minimal” variant is\ncurrently deployed by default. Released container images are available for\nx86_64 and Arm64 architectures.</p>\n\n<h2 id=\"minimal\">Minimal</h2>\n\n<p>This is a minimal image based on\n<a href=\"https://github.com/GoogleContainerTools/distroless/blob/master/base/README.md\">gcr.io/distroless/base</a>\nand only supports running statically linked binaries.</p>\n\n<p>For backwards compatibility a container image tag with suffix <code class=\"language-plaintext highlighter-rouge\">-minimal</code>\n(e.g. <code class=\"language-plaintext highlighter-rouge\">registry.k8s.io/nfd/node-feature-discovery:v0.13.6-minimal</code>) is provided.</p>\n\n<h2 id=\"full\">Full</h2>\n\n<p>This image is based on <a href=\"https://hub.docker.com/_/debian\">debian:bullseye-slim</a>\nand contains a full Linux system for running shell-based nfd-worker hooks and\ndoing live debugging and diagnosis of the NFD images.</p>\n\n<p>The container image tag has suffix <code class=\"language-plaintext highlighter-rouge\">-full</code>\n(e.g. <code class=\"language-plaintext highlighter-rouge\">registry.k8s.io/nfd/node-feature-discovery:v0.13.6-full</code>).</p>\n","dir":"/deployment/","name":"image-variants.md","path":"deployment/image-variants.md","url":"/deployment/image-variants.html"},{"title":"Introduction","layout":"default","sort":1,"content":"<h1 class=\"no_toc\" id=\"introduction\">Introduction</h1>\n\n<h2 class=\"no_toc text-delta\" id=\"table-of-contents\">Table of contents</h2>\n\n<ol id=\"markdown-toc\">\n <li><a href=\"#nfd-master\" id=\"markdown-toc-nfd-master\">NFD-Master</a></li>\n <li><a href=\"#nfd-worker\" id=\"markdown-toc-nfd-worker\">NFD-Worker</a></li>\n <li><a href=\"#nfd-topology-updater\" id=\"markdown-toc-nfd-topology-updater\">NFD-Topology-Updater</a></li>\n <li><a href=\"#nfd-topology-gc\" id=\"markdown-toc-nfd-topology-gc\">NFD-Topology-GC</a></li>\n <li><a href=\"#feature-discovery\" id=\"markdown-toc-feature-discovery\">Feature Discovery</a></li>\n <li><a href=\"#node-annotations\" id=\"markdown-toc-node-annotations\">Node annotations</a></li>\n <li><a href=\"#custom-resources\" id=\"markdown-toc-custom-resources\">Custom resources</a></li>\n</ol>\n\n<hr />\n\n<p>This software enables node feature discovery for Kubernetes. It detects\nhardware features available on each node in a Kubernetes cluster, and\nadvertises those features using node labels and optionally node extended\nresources and node taints.</p>\n\n<p>NFD consists of four software components:</p>\n\n<ol>\n <li>nfd-master</li>\n <li>nfd-worker</li>\n <li>nfd-topology-updater</li>\n <li>nfd-topology-gc</li>\n</ol>\n\n<h2 id=\"nfd-master\">NFD-Master</h2>\n\n<p>NFD-Master is the daemon responsible for communication towards the Kubernetes\nAPI. That is, it receives labeling requests from the worker and modifies node\nobjects accordingly.</p>\n\n<h2 id=\"nfd-worker\">NFD-Worker</h2>\n\n<p>NFD-Worker is a daemon responsible for feature detection. It then communicates\nthe information to nfd-master which does the actual node labeling. One\ninstance of nfd-worker is supposed to be running on each node of the cluster,</p>\n\n<h2 id=\"nfd-topology-updater\">NFD-Topology-Updater</h2>\n\n<p>NFD-Topology-Updater is a daemon responsible for examining allocated\nresources on a worker node to account for resources available to be allocated\nto new pod on a per-zone basis (where a zone can be a NUMA node). It then\ncreates or updates a\n<a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#noderesourcetopology\">NodeResourceTopology</a> custom\nresource object specific to this node. One instance of nfd-topology-updater is\nsupposed to be running on each node of the cluster.</p>\n\n<h2 id=\"nfd-topology-gc\">NFD-Topology-GC</h2>\n\n<p>NFD-Topology-GC is a daemon responsible for cleaning obsolete\n<a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#noderesourcetopology\">NodeResourceTopology</a> objects,\nobsolete means that there is no corresponding worker node.</p>\n\n<p>One instance of nfd-topology-gc is supposed to be running in the cluster.</p>\n\n<h2 id=\"feature-discovery\">Feature Discovery</h2>\n\n<p>Feature discovery is divided into domain-specific feature sources:</p>\n\n<ul>\n <li>CPU</li>\n <li>Kernel</li>\n <li>Memory</li>\n <li>Network</li>\n <li>PCI</li>\n <li>Storage</li>\n <li>System</li>\n <li>USB</li>\n <li>Custom (rule-based custom features)</li>\n <li>Local (hooks for user-specific features)</li>\n</ul>\n\n<p>Each feature source is responsible for detecting a set of features which. in\nturn, are turned into node feature labels. Feature labels are prefixed with\n<code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/</code> and also contain the name of the feature source.\nNon-standard user-specific feature labels can be created with the local and\ncustom feature sources.</p>\n\n<p>An overview of the default feature labels:</p>\n\n<div class=\"language-json highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"p\">{</span><span class=\"w\">\n </span><span class=\"nl\">\"feature.node.kubernetes.io/cpu-<feature-name>\"</span><span class=\"p\">:</span><span class=\"w\"> </span><span class=\"s2\">\"true\"</span><span class=\"p\">,</span><span class=\"w\">\n </span><span class=\"nl\">\"feature.node.kubernetes.io/custom-<feature-name>\"</span><span class=\"p\">:</span><span class=\"w\"> </span><span class=\"s2\">\"true\"</span><span class=\"p\">,</span><span class=\"w\">\n </span><span class=\"nl\">\"feature.node.kubernetes.io/kernel-<feature name>\"</span><span class=\"p\">:</span><span class=\"w\"> </span><span class=\"s2\">\"<feature value>\"</span><span class=\"p\">,</span><span class=\"w\">\n </span><span class=\"nl\">\"feature.node.kubernetes.io/memory-<feature-name>\"</span><span class=\"p\">:</span><span class=\"w\"> </span><span class=\"s2\">\"true\"</span><span class=\"p\">,</span><span class=\"w\">\n </span><span class=\"nl\">\"feature.node.kubernetes.io/network-<feature-name>\"</span><span class=\"p\">:</span><span class=\"w\"> </span><span class=\"s2\">\"true\"</span><span class=\"p\">,</span><span class=\"w\">\n </span><span class=\"nl\">\"feature.node.kubernetes.io/pci-<device label>.present\"</span><span class=\"p\">:</span><span class=\"w\"> </span><span class=\"s2\">\"true\"</span><span class=\"p\">,</span><span class=\"w\">\n </span><span class=\"nl\">\"feature.node.kubernetes.io/storage-<feature-name>\"</span><span class=\"p\">:</span><span class=\"w\"> </span><span class=\"s2\">\"true\"</span><span class=\"p\">,</span><span class=\"w\">\n </span><span class=\"nl\">\"feature.node.kubernetes.io/system-<feature name>\"</span><span class=\"p\">:</span><span class=\"w\"> </span><span class=\"s2\">\"<feature value>\"</span><span class=\"p\">,</span><span class=\"w\">\n </span><span class=\"nl\">\"feature.node.kubernetes.io/usb-<device label>.present\"</span><span class=\"p\">:</span><span class=\"w\"> </span><span class=\"s2\">\"<feature value>\"</span><span class=\"p\">,</span><span class=\"w\">\n </span><span class=\"nl\">\"feature.node.kubernetes.io/<file name>-<feature name>\"</span><span class=\"p\">:</span><span class=\"w\"> </span><span class=\"s2\">\"<feature value>\"</span><span class=\"w\">\n</span><span class=\"p\">}</span><span class=\"w\">\n</span></code></pre> </div></div>\n\n<h2 id=\"node-annotations\">Node annotations</h2>\n\n<p>NFD also annotates nodes it is running on:</p>\n\n<table>\n <thead>\n <tr>\n <th>Annotation</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>[<instance>.]nfd.node.kubernetes.io/master.version</td>\n <td>Version of the nfd-master instance running on the node. Informative use only.</td>\n </tr>\n <tr>\n <td>[<instance>.]nfd.node.kubernetes.io/worker.version</td>\n <td>Version of the nfd-worker instance running on the node. Informative use only.</td>\n </tr>\n <tr>\n <td>[<instance>.]nfd.node.kubernetes.io/feature-labels</td>\n <td>Comma-separated list of node labels managed by NFD. NFD uses this internally so must not be edited by users.</td>\n </tr>\n <tr>\n <td>[<instance>.]nfd.node.kubernetes.io/extended-resources</td>\n <td>Comma-separated list of node extended resources managed by NFD. NFD uses this internally so must not be edited by users.</td>\n </tr>\n </tbody>\n</table>\n\n<p>NOTE: the <a href=\"/node-feature-discovery/v0.13/reference/master-commandline-reference.html#instance\"><code class=\"language-plaintext highlighter-rouge\">-instance</code></a>\ncommand line flag affects the annotation names</p>\n\n<p>Unapplicable annotations are not created, i.e. for example master.version is\nonly created on nodes running nfd-master.</p>\n\n<h2 id=\"custom-resources\">Custom resources</h2>\n\n<p>NFD takes use of some Kubernetes Custom Resources.</p>\n\n<p><a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#nodefeature\">NodeFeature</a>s (EXPERIMENTAL)\ncan be used for representing node features and requesting node labels to be\ngenerated.</p>\n\n<p>NFD-Master uses <a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#nodefeaturerule\">NodeFeatureRule</a>s\nfor custom labeling of nodes.</p>\n\n<p>NFD-Topology-Updater creates\n<a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#noderesourcetopology\">NodeResourceTopology</a> objects\nthat describe the hardware topology of node resources.</p>\n","dir":"/get-started/","name":"introduction.md","path":"get-started/introduction.md","url":"/get-started/introduction.html"},{"title":"Master cmdline reference","layout":"default","sort":1,"content":"<h1 class=\"no_toc\" id=\"commandline-flags-of-nfd-master\">Commandline flags of nfd-master</h1>\n\n<h2 class=\"no_toc text-delta\" id=\"table-of-contents\">Table of contents</h2>\n\n<ol id=\"markdown-toc\">\n <li><a href=\"#-h--help\" id=\"markdown-toc--h--help\">-h, -help</a></li>\n <li><a href=\"#-version\" id=\"markdown-toc--version\">-version</a></li>\n <li><a href=\"#-prune\" id=\"markdown-toc--prune\">-prune</a></li>\n <li><a href=\"#-port\" id=\"markdown-toc--port\">-port</a></li>\n <li><a href=\"#-instance\" id=\"markdown-toc--instance\">-instance</a></li>\n <li><a href=\"#-ca-file\" id=\"markdown-toc--ca-file\">-ca-file</a></li>\n <li><a href=\"#-cert-file\" id=\"markdown-toc--cert-file\">-cert-file</a></li>\n <li><a href=\"#-key-file\" id=\"markdown-toc--key-file\">-key-file</a></li>\n <li><a href=\"#-verify-node-name\" id=\"markdown-toc--verify-node-name\">-verify-node-name</a></li>\n <li><a href=\"#-enable-nodefeature-api\" id=\"markdown-toc--enable-nodefeature-api\">-enable-nodefeature-api</a></li>\n <li><a href=\"#-enable-taints\" id=\"markdown-toc--enable-taints\">-enable-taints</a></li>\n <li><a href=\"#-no-publish\" id=\"markdown-toc--no-publish\">-no-publish</a></li>\n <li><a href=\"#-crd-controller\" id=\"markdown-toc--crd-controller\">-crd-controller</a></li>\n <li><a href=\"#-featurerules-controller\" id=\"markdown-toc--featurerules-controller\">-featurerules-controller</a></li>\n <li><a href=\"#-label-whitelist\" id=\"markdown-toc--label-whitelist\">-label-whitelist</a></li>\n <li><a href=\"#-extra-label-ns\" id=\"markdown-toc--extra-label-ns\">-extra-label-ns</a></li>\n <li><a href=\"#-deny-label-ns\" id=\"markdown-toc--deny-label-ns\">-deny-label-ns</a></li>\n <li><a href=\"#-resource-labels\" id=\"markdown-toc--resource-labels\">-resource-labels</a></li>\n <li><a href=\"#-config\" id=\"markdown-toc--config\">-config</a></li>\n <li><a href=\"#-options\" id=\"markdown-toc--options\">-options</a></li>\n <li><a href=\"#logging\" id=\"markdown-toc-logging\">Logging</a></li>\n</ol>\n\n<hr />\n\n<p>To quickly view available command line flags execute <code class=\"language-plaintext highlighter-rouge\">nfd-master -help</code>.\nIn a docker container:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>docker run registry.k8s.io/nfd/node-feature-discovery:v0.13.6 nfd-master <span class=\"nt\">-help</span>\n</code></pre> </div></div>\n\n<h3 id=\"-h--help\">-h, -help</h3>\n\n<p>Print usage and exit.</p>\n\n<h3 id=\"-version\">-version</h3>\n\n<p>Print version and exit.</p>\n\n<h3 id=\"-prune\">-prune</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-prune</code> flag is a sub-command like option for cleaning up the cluster. It\ncauses nfd-master to remove all NFD related labels, annotations and extended\nresources from all Node objects of the cluster and exit.</p>\n\n<h3 id=\"-port\">-port</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-port</code> flag specifies the TCP port that nfd-master listens for incoming requests.</p>\n\n<p>Default: 8080</p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-master <span class=\"nt\">-port</span><span class=\"o\">=</span>443\n</code></pre> </div></div>\n\n<h3 id=\"-instance\">-instance</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-instance</code> flag makes it possible to run multiple NFD deployments in\nparallel. In practice, it separates the node annotations between deployments so\nthat each of them can store metadata independently. The instance name must\nstart and end with an alphanumeric character and may only contain alphanumeric\ncharacters, <code class=\"language-plaintext highlighter-rouge\">-</code>, <code class=\"language-plaintext highlighter-rouge\">_</code> or <code class=\"language-plaintext highlighter-rouge\">.</code>.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-master <span class=\"nt\">-instance</span><span class=\"o\">=</span>network\n</code></pre> </div></div>\n\n<h3 id=\"-ca-file\">-ca-file</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-ca-file</code> is one of the three flags (together with <code class=\"language-plaintext highlighter-rouge\">-cert-file</code> and\n<code class=\"language-plaintext highlighter-rouge\">-key-file</code>) controlling master-worker mutual TLS authentication on the\nnfd-master side. This flag specifies the TLS root certificate that is used for\nauthenticating incoming connections. NFD-Worker side needs to have matching key\nand cert files configured in order for the incoming requests to be accepted.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Note: Must be specified together with <code class=\"language-plaintext highlighter-rouge\">-cert-file</code> and <code class=\"language-plaintext highlighter-rouge\">-key-file</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-master <span class=\"nt\">-ca-file</span><span class=\"o\">=</span>/opt/nfd/ca.crt <span class=\"nt\">-cert-file</span><span class=\"o\">=</span>/opt/nfd/master.crt <span class=\"nt\">-key-file</span><span class=\"o\">=</span>/opt/nfd/master.key\n</code></pre> </div></div>\n\n<h3 id=\"-cert-file\">-cert-file</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-cert-file</code> is one of the three flags (together with <code class=\"language-plaintext highlighter-rouge\">-ca-file</code> and\n<code class=\"language-plaintext highlighter-rouge\">-key-file</code>) controlling master-worker mutual TLS authentication on the\nnfd-master side. This flag specifies the TLS certificate presented for\nauthenticating outgoing traffic towards nfd-worker.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Note: Must be specified together with <code class=\"language-plaintext highlighter-rouge\">-ca-file</code> and <code class=\"language-plaintext highlighter-rouge\">-key-file</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-master <span class=\"nt\">-cert-file</span><span class=\"o\">=</span>/opt/nfd/master.crt <span class=\"nt\">-key-file</span><span class=\"o\">=</span>/opt/nfd/master.key <span class=\"nt\">-ca-file</span><span class=\"o\">=</span>/opt/nfd/ca.crt\n</code></pre> </div></div>\n\n<h3 id=\"-key-file\">-key-file</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-key-file</code> is one of the three flags (together with <code class=\"language-plaintext highlighter-rouge\">-ca-file</code> and\n<code class=\"language-plaintext highlighter-rouge\">-cert-file</code>) controlling master-worker mutual TLS authentication on the\nnfd-master side. This flag specifies the private key corresponding the given\ncertificate file (<code class=\"language-plaintext highlighter-rouge\">-cert-file</code>) that is used for authenticating outgoing\ntraffic.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Note: Must be specified together with <code class=\"language-plaintext highlighter-rouge\">-cert-file</code> and <code class=\"language-plaintext highlighter-rouge\">-ca-file</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-master <span class=\"nt\">-key-file</span><span class=\"o\">=</span>/opt/nfd/master.key <span class=\"nt\">-cert-file</span><span class=\"o\">=</span>/opt/nfd/master.crt <span class=\"nt\">-ca-file</span><span class=\"o\">=</span>/opt/nfd/ca.crt\n</code></pre> </div></div>\n\n<h3 id=\"-verify-node-name\">-verify-node-name</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-verify-node-name</code> flag controls the NodeName based authorization of\nincoming requests and only has effect when mTLS authentication has been enabled\n(with <code class=\"language-plaintext highlighter-rouge\">-ca-file</code>, <code class=\"language-plaintext highlighter-rouge\">-cert-file</code> and <code class=\"language-plaintext highlighter-rouge\">-key-file</code>). If enabled, the worker node\nname of the incoming must match with the CN or a SAN in its TLS certificate. Thus,\nworkers are only able to label the node they are running on (or the node whose\ncertificate they present).</p>\n\n<p>Node Name based authorization is disabled by default.</p>\n\n<p>Default: <em>false</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-master <span class=\"nt\">-verify-node-name</span> <span class=\"nt\">-ca-file</span><span class=\"o\">=</span>/opt/nfd/ca.crt <span class=\"se\">\\</span>\n <span class=\"nt\">-cert-file</span><span class=\"o\">=</span>/opt/nfd/master.crt <span class=\"nt\">-key-file</span><span class=\"o\">=</span>/opt/nfd/master.key\n</code></pre> </div></div>\n\n<h3 id=\"-enable-nodefeature-api\">-enable-nodefeature-api</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-enable-nodefeature-api</code> flag enables the\n<a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#nodefeature\">NodeFeature</a> CRD API for receiving\nfeature requests. This will also automatically disable the gRPC interface.</p>\n\n<p>Default: false</p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-master <span class=\"nt\">-enable-nodefeature-api</span>\n</code></pre> </div></div>\n\n<h3 id=\"-enable-taints\">-enable-taints</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-enable-taints</code> flag enables/disables node tainting feature of NFD.</p>\n\n<p>Default: <em>false</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-master <span class=\"nt\">-enable-taints</span><span class=\"o\">=</span><span class=\"nb\">true</span>\n</code></pre> </div></div>\n\n<h3 id=\"-no-publish\">-no-publish</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-no-publish</code> flag disables updates to the Node objects in the Kubernetes\nAPI server, making a “dry-run” flag for nfd-master. No Labels, Annotations or\nExtendedResources of nodes are updated.</p>\n\n<p>Default: <em>false</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-master <span class=\"nt\">-no-publish</span>\n</code></pre> </div></div>\n\n<h3 id=\"-crd-controller\">-crd-controller</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-crd-controller</code> flag specifies whether the NFD CRD API controller is\nenabled or not. The controller is responsible for processing\n<a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#nodefeature\">NodeFeature</a> and\n<a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#nodefeaturerule\">NodeFeatureRule</a> objects.</p>\n\n<p>Default: <em>true</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-master <span class=\"nt\">-crd-controller</span><span class=\"o\">=</span><span class=\"nb\">false</span>\n</code></pre> </div></div>\n\n<h3 id=\"-featurerules-controller\">-featurerules-controller</h3>\n\n<p><strong>DEPRECATED</strong>: use <a href=\"#-crd-controller\"><code class=\"language-plaintext highlighter-rouge\">-crd-controller</code></a> instead.</p>\n\n<h3 id=\"-label-whitelist\">-label-whitelist</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-label-whitelist</code> specifies a regular expression for filtering feature\nlabels based on their name. Each label must match against the given reqular\nexpression in order to be published.</p>\n\n<p>Note: The regular expression is only matches against the “basename” part of the\nlabel, i.e. to the part of the name after ‘/’. The label namespace is omitted.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-master <span class=\"nt\">-label-whitelist</span><span class=\"o\">=</span><span class=\"s1\">'.*cpuid\\.'</span>\n</code></pre> </div></div>\n\n<h3 id=\"-extra-label-ns\">-extra-label-ns</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-extra-label-ns</code> flag specifies a comma-separated list of allowed feature\nlabel namespaces. This option can be used to allow\nother vendor or application specific namespaces for custom labels from the\nlocal and custom feature sources, even though these labels were denied using\nthe <code class=\"language-plaintext highlighter-rouge\">deny-label-ns</code> flag.</p>\n\n<p>The same namespace control and this flag applies Extended Resources (created\nwith <code class=\"language-plaintext highlighter-rouge\">-resource-labels</code>), too.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-master <span class=\"nt\">-extra-label-ns</span><span class=\"o\">=</span>vendor-1.com,vendor-2.io\n</code></pre> </div></div>\n\n<h3 id=\"-deny-label-ns\">-deny-label-ns</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-deny-label-ns</code> flag specifies a comma-separated list of excluded\nlabel namespaces. By default, nfd-master allows creating labels in all\nnamespaces, excluding <code class=\"language-plaintext highlighter-rouge\">kubernetes.io</code> namespace and its sub-namespaces\n(i.e. <code class=\"language-plaintext highlighter-rouge\">*.kubernetes.io</code>). However, you should note that\n<code class=\"language-plaintext highlighter-rouge\">kubernetes.io</code> and its sub-namespaces are always denied.\nFor example, <code class=\"language-plaintext highlighter-rouge\">nfd-master -deny-label-ns=\"\"</code> would still disallow\n<code class=\"language-plaintext highlighter-rouge\">kubernetes.io</code> and <code class=\"language-plaintext highlighter-rouge\">*.kubernetes.io</code>.\nThis option can be used to exclude some vendors or application specific\nnamespaces.\nNote that the namespaces <code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io</code> and <code class=\"language-plaintext highlighter-rouge\">profile.node.kubernetes.io</code>\nand their sub-namespaces are always allowed and cannot be denied.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-master <span class=\"nt\">-deny-label-ns</span><span class=\"o\">=</span><span class=\"k\">*</span>.vendor.com,vendor-2.io\n</code></pre> </div></div>\n\n<h3 id=\"-resource-labels\">-resource-labels</h3>\n\n<p><strong>DEPRECATED</strong>: <a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#nodefeaturerule\">NodeFeatureRule</a>\nshould be used for managing extended resources in NFD.</p>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-resource-labels</code> flag specifies a comma-separated list of features to be\nadvertised as extended resources instead of labels. Features that have integer\nvalues can be published as Extended Resources by listing them in this flag.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-master <span class=\"nt\">-resource-labels</span><span class=\"o\">=</span>vendor-1.com/feature-1,vendor-2.io/feature-2\n</code></pre> </div></div>\n\n<h3 id=\"-config\">-config</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-config</code> flag specifies the path of the nfd-master configuration file to\nuse.</p>\n\n<p>Default: /etc/kubernetes/node-feature-discovery/nfd-master.conf</p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-master <span class=\"nt\">-config</span><span class=\"o\">=</span>/opt/nfd/master.conf\n</code></pre> </div></div>\n\n<h3 id=\"-options\">-options</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-options</code> flag may be used to specify and override configuration file\noptions directly from the command line. The required format is the same as in\nthe config file i.e. JSON or YAML. Configuration options specified via this\nflag will override those from the configuration file:</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-master <span class=\"nt\">-options</span><span class=\"o\">=</span><span class=\"s1\">'{\"noPublish\": true}'</span>\n</code></pre> </div></div>\n\n<h3 id=\"logging\">Logging</h3>\n\n<p>The following logging-related flags are inherited from the\n<a href=\"https://pkg.go.dev/k8s.io/klog/v2\">klog</a> package.</p>\n\n<h4 id=\"-add_dir_header\">-add_dir_header</h4>\n\n<p>If true, adds the file directory to the header of the log messages.</p>\n\n<p>Default: false</p>\n\n<h4 id=\"-alsologtostderr\">-alsologtostderr</h4>\n\n<p>Log to standard error as well as files.</p>\n\n<p>Default: false</p>\n\n<h4 id=\"-log_backtrace_at\">-log_backtrace_at</h4>\n\n<p>When logging hits line file:N, emit a stack trace.</p>\n\n<p>Default: <em>empty</em></p>\n\n<h4 id=\"-log_dir\">-log_dir</h4>\n\n<p>If non-empty, write log files in this directory.</p>\n\n<p>Default: <em>empty</em></p>\n\n<h4 id=\"-log_file\">-log_file</h4>\n\n<p>If non-empty, use this log file.</p>\n\n<p>Default: <em>empty</em></p>\n\n<h4 id=\"-log_file_max_size\">-log_file_max_size</h4>\n\n<p>Defines the maximum size a log file can grow to. Unit is megabytes. If the\nvalue is 0, the maximum file size is unlimited.</p>\n\n<p>Default: 1800</p>\n\n<h4 id=\"-logtostderr\">-logtostderr</h4>\n\n<p>Log to standard error instead of files</p>\n\n<p>Default: true</p>\n\n<h4 id=\"-skip_headers\">-skip_headers</h4>\n\n<p>If true, avoid header prefixes in the log messages.</p>\n\n<p>Default: false</p>\n\n<h4 id=\"-skip_log_headers\">-skip_log_headers</h4>\n\n<p>If true, avoid headers when opening log files.</p>\n\n<p>Default: false</p>\n\n<h4 id=\"-stderrthreshold\">-stderrthreshold</h4>\n\n<p>Logs at or above this threshold go to stderr.</p>\n\n<p>Default: 2</p>\n\n<h4 id=\"-v\">-v</h4>\n\n<p>Number for the log level verbosity.</p>\n\n<p>Default: 0</p>\n\n<h4 id=\"-vmodule\">-vmodule</h4>\n\n<p>Comma-separated list of <code class=\"language-plaintext highlighter-rouge\">pattern=N</code> settings for file-filtered logging.</p>\n\n<p>Default: <em>empty</em></p>\n","dir":"/reference/","name":"master-commandline-reference.md","path":"reference/master-commandline-reference.md","url":"/reference/master-commandline-reference.html"},{"title":"Using node labels","layout":"default","sort":2,"content":"<h1 class=\"no_toc\" id=\"using-node-labels\">Using node labels</h1>\n\n<hr />\n\n<p>Nodes with specific features can be targeted using the <code class=\"language-plaintext highlighter-rouge\">nodeSelector</code> field. The\nfollowing example shows how to target nodes with Intel TurboBoost enabled.</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">apiVersion</span><span class=\"pi\">:</span> <span class=\"s\">v1</span>\n<span class=\"na\">kind</span><span class=\"pi\">:</span> <span class=\"s\">Pod</span>\n<span class=\"na\">metadata</span><span class=\"pi\">:</span>\n <span class=\"na\">labels</span><span class=\"pi\">:</span>\n <span class=\"na\">env</span><span class=\"pi\">:</span> <span class=\"s\">test</span>\n <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s\">golang-test</span>\n<span class=\"na\">spec</span><span class=\"pi\">:</span>\n <span class=\"na\">containers</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">image</span><span class=\"pi\">:</span> <span class=\"s\">golang</span>\n <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s\">go1</span>\n <span class=\"na\">nodeSelector</span><span class=\"pi\">:</span>\n <span class=\"s\">feature.node.kubernetes.io/cpu-pstate.turbo</span><span class=\"pi\">:</span> <span class=\"s1\">'</span><span class=\"s\">true'</span>\n</code></pre> </div></div>\n\n<p>For more details on targeting nodes, see\n<a href=\"https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/\">node selection</a>.</p>\n","dir":"/usage/","name":"using-labels.md","path":"usage/using-labels.md","url":"/usage/using-labels.html"},{"title":"Worker cmdline reference","layout":"default","sort":2,"content":"<h1 class=\"no_toc\" id=\"commandline-flags-of-nfd-worker\">Commandline flags of nfd-worker</h1>\n\n<h2 class=\"no_toc text-delta\" id=\"table-of-contents\">Table of contents</h2>\n\n<ol id=\"markdown-toc\">\n <li><a href=\"#-h--help\" id=\"markdown-toc--h--help\">-h, -help</a></li>\n <li><a href=\"#-version\" id=\"markdown-toc--version\">-version</a></li>\n <li><a href=\"#-config\" id=\"markdown-toc--config\">-config</a></li>\n <li><a href=\"#-options\" id=\"markdown-toc--options\">-options</a></li>\n <li><a href=\"#-server\" id=\"markdown-toc--server\">-server</a></li>\n <li><a href=\"#-ca-file\" id=\"markdown-toc--ca-file\">-ca-file</a></li>\n <li><a href=\"#-cert-file\" id=\"markdown-toc--cert-file\">-cert-file</a></li>\n <li><a href=\"#-key-file\" id=\"markdown-toc--key-file\">-key-file</a></li>\n <li><a href=\"#-kubeconfig\" id=\"markdown-toc--kubeconfig\">-kubeconfig</a></li>\n <li><a href=\"#-server-name-override\" id=\"markdown-toc--server-name-override\">-server-name-override</a></li>\n <li><a href=\"#-feature-sources\" id=\"markdown-toc--feature-sources\">-feature-sources</a></li>\n <li><a href=\"#-label-sources\" id=\"markdown-toc--label-sources\">-label-sources</a></li>\n <li><a href=\"#-enable-nodefeature-api\" id=\"markdown-toc--enable-nodefeature-api\">-enable-nodefeature-api</a></li>\n <li><a href=\"#-no-publish\" id=\"markdown-toc--no-publish\">-no-publish</a></li>\n <li><a href=\"#-oneshot\" id=\"markdown-toc--oneshot\">-oneshot</a></li>\n <li><a href=\"#logging\" id=\"markdown-toc-logging\">Logging</a></li>\n</ol>\n\n<hr />\n\n<p>To quickly view available command line flags execute <code class=\"language-plaintext highlighter-rouge\">nfd-worker -help</code>.\nIn a docker container:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>docker run registry.k8s.io/nfd/node-feature-discovery:v0.13.6 nfd-worker <span class=\"nt\">-help</span>\n</code></pre> </div></div>\n\n<h3 id=\"-h--help\">-h, -help</h3>\n\n<p>Print usage and exit.</p>\n\n<h3 id=\"-version\">-version</h3>\n\n<p>Print version and exit.</p>\n\n<h3 id=\"-config\">-config</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-config</code> flag specifies the path of the nfd-worker configuration file to\nuse.</p>\n\n<p>Default: /etc/kubernetes/node-feature-discovery/nfd-worker.conf</p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-worker <span class=\"nt\">-config</span><span class=\"o\">=</span>/opt/nfd/worker.conf\n</code></pre> </div></div>\n\n<h3 id=\"-options\">-options</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-options</code> flag may be used to specify and override configuration file\noptions directly from the command line. The required format is the same as in\nthe config file i.e. JSON or YAML. Configuration options specified via this\nflag will override those from the configuration file:</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-worker <span class=\"nt\">-options</span><span class=\"o\">=</span><span class=\"s1\">'{\"sources\":{\"cpu\":{\"cpuid\":{\"attributeWhitelist\":[\"AVX\",\"AVX2\"]}}}}'</span>\n</code></pre> </div></div>\n\n<h3 id=\"-server\">-server</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-server</code> flag specifies the address of the nfd-master endpoint where to\nconnect to.</p>\n\n<p>Default: localhost:8080</p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-worker <span class=\"nt\">-server</span><span class=\"o\">=</span>nfd-master.nfd.svc.cluster.local:443\n</code></pre> </div></div>\n\n<h3 id=\"-ca-file\">-ca-file</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-ca-file</code> is one of the three flags (together with <code class=\"language-plaintext highlighter-rouge\">-cert-file</code> and\n<code class=\"language-plaintext highlighter-rouge\">-key-file</code>) controlling the mutual TLS authentication on the worker side.\nThis flag specifies the TLS root certificate that is used for verifying the\nauthenticity of nfd-master.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Note: Must be specified together with <code class=\"language-plaintext highlighter-rouge\">-cert-file</code> and <code class=\"language-plaintext highlighter-rouge\">-key-file</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-worker <span class=\"nt\">-ca-file</span><span class=\"o\">=</span>/opt/nfd/ca.crt <span class=\"nt\">-cert-file</span><span class=\"o\">=</span>/opt/nfd/worker.crt <span class=\"nt\">-key-file</span><span class=\"o\">=</span>/opt/nfd/worker.key\n</code></pre> </div></div>\n\n<h3 id=\"-cert-file\">-cert-file</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-cert-file</code> is one of the three flags (together with <code class=\"language-plaintext highlighter-rouge\">-ca-file</code> and\n<code class=\"language-plaintext highlighter-rouge\">-key-file</code>) controlling mutual TLS authentication on the worker side. This\nflag specifies the TLS certificate presented for authenticating outgoing\nrequests.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Note: Must be specified together with <code class=\"language-plaintext highlighter-rouge\">-ca-file</code> and <code class=\"language-plaintext highlighter-rouge\">-key-file</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-workerr <span class=\"nt\">-cert-file</span><span class=\"o\">=</span>/opt/nfd/worker.crt <span class=\"nt\">-key-file</span><span class=\"o\">=</span>/opt/nfd/worker.key <span class=\"nt\">-ca-file</span><span class=\"o\">=</span>/opt/nfd/ca.crt\n</code></pre> </div></div>\n\n<h3 id=\"-key-file\">-key-file</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-key-file</code> is one of the three flags (together with <code class=\"language-plaintext highlighter-rouge\">-ca-file</code> and\n<code class=\"language-plaintext highlighter-rouge\">-cert-file</code>) controlling the mutual TLS authentication on the worker side.\nThis flag specifies the private key corresponding the given certificate file\n(<code class=\"language-plaintext highlighter-rouge\">-cert-file</code>) that is used for authenticating outgoing requests.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Note: Must be specified together with <code class=\"language-plaintext highlighter-rouge\">-cert-file</code> and <code class=\"language-plaintext highlighter-rouge\">-ca-file</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-worker <span class=\"nt\">-key-file</span><span class=\"o\">=</span>/opt/nfd/worker.key <span class=\"nt\">-cert-file</span><span class=\"o\">=</span>/opt/nfd/worker.crt <span class=\"nt\">-ca-file</span><span class=\"o\">=</span>/opt/nfd/ca.crt\n</code></pre> </div></div>\n\n<h3 id=\"-kubeconfig\">-kubeconfig</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-kubeconfig</code> flag specifies the kubeconfig to use for connecting to the\nKubernetes API server. It is only needed for manipulating\n<a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#nodefeature\">NodeFeature</a> objects, and thus the flag\nonly takes effect when\n<a href=\"#-enable-nodefeature-api\"><code class=\"language-plaintext highlighter-rouge\">-enable-nodefeature-api</code></a>) is specified. An empty\nvalue (which is also the default) implies in-cluster kubeconfig.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-worker <span class=\"nt\">-kubeconfig</span> <span class=\"k\">${</span><span class=\"nv\">HOME</span><span class=\"k\">}</span>/.kube/config\n</code></pre> </div></div>\n\n<h3 id=\"-server-name-override\">-server-name-override</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-server-name-override</code> flag specifies the common name (CN) which to\nexpect from the nfd-master TLS certificate. This flag is mostly intended for\ndevelopment and debugging purposes.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-worker <span class=\"nt\">-server-name-override</span><span class=\"o\">=</span>localhost\n</code></pre> </div></div>\n\n<h3 id=\"-feature-sources\">-feature-sources</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-feature-sources</code> flag specifies a comma-separated list of enabled feature\nsources. A special value <code class=\"language-plaintext highlighter-rouge\">all</code> enables all sources. Prefixing a source name\nwith <code class=\"language-plaintext highlighter-rouge\">-</code> indicates that the source will be disabled instead - this is only\nmeaningful when used in conjunction with <code class=\"language-plaintext highlighter-rouge\">all</code>. This command line flag allows\ncompletely disabling the feature detection so that neither standard feature\nlabels are generated nor the raw feature data is available for custom rule\nprocessing. Consider using the <code class=\"language-plaintext highlighter-rouge\">core.featureSources</code> config file option,\ninstead, allowing dynamic configurability.</p>\n\n<p>Note: This flag takes precedence over the <code class=\"language-plaintext highlighter-rouge\">core.featureSources</code> configuration\nfile option.</p>\n\n<p>Default: all</p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-worker <span class=\"nt\">-feature-sources</span><span class=\"o\">=</span>all,-pci\n</code></pre> </div></div>\n\n<h3 id=\"-label-sources\">-label-sources</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-label-sources</code> flag specifies a comma-separated list of enabled label\nsources. A special value <code class=\"language-plaintext highlighter-rouge\">all</code> enables all sources. Prefixing a source name\nwith <code class=\"language-plaintext highlighter-rouge\">-</code> indicates that the source will be disabled instead - this is only\nmeaningful when used in conjunction with <code class=\"language-plaintext highlighter-rouge\">all</code>. Consider using the\n<code class=\"language-plaintext highlighter-rouge\">core.labelSources</code> config file option, instead, allowing dynamic\nconfigurability.</p>\n\n<p>Note: This flag takes precedence over the <code class=\"language-plaintext highlighter-rouge\">core.labelSources</code> configuration\nfile option.</p>\n\n<p>Default: all</p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-worker <span class=\"nt\">-label-sources</span><span class=\"o\">=</span>kernel,system,local\n</code></pre> </div></div>\n\n<h3 id=\"-enable-nodefeature-api\">-enable-nodefeature-api</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-enable-nodefeature-api</code> flag enables the experimental\n<a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#nodefeature\">NodeFeature</a> CRD API\nfor communicating with nfd-master. This will also automatically disable the\ngRPC communication to nfd-master. When enabled, nfd-worker will create per-node\nNodeFeature objects the contain all discovered node features and the set of\nfeature labels to be created.</p>\n\n<p>Default: false</p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-worker <span class=\"nt\">-enable-nodefeature-api</span>\n</code></pre> </div></div>\n\n<h3 id=\"-no-publish\">-no-publish</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-no-publish</code> flag disables all communication with the nfd-master and the\nKubernetes API server. It is effectively a “dry-run” flag for nfd-worker.\nNFD-Worker runs feature detection normally, but no labeling requests are sent\nto nfd-master and no NodeFeature objects are created or updated in the API\nserver.</p>\n\n<p>Note: This flag takes precedence over the\n<a href=\"/node-feature-discovery/v0.13/reference/worker-configuration-reference.html#corenopublish\"><code class=\"language-plaintext highlighter-rouge\">core.noPublish</code></a>\nconfiguration file option.</p>\n\n<p>Default: <em>false</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-worker <span class=\"nt\">-no-publish</span>\n</code></pre> </div></div>\n\n<h3 id=\"-oneshot\">-oneshot</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-oneshot</code> flag causes nfd-worker to exit after one pass of feature\ndetection.</p>\n\n<p>Default: <em>false</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-worker <span class=\"nt\">-oneshot</span> <span class=\"nt\">-no-publish</span>\n</code></pre> </div></div>\n\n<h3 id=\"logging\">Logging</h3>\n\n<p>The following logging-related flags are inherited from the\n<a href=\"https://pkg.go.dev/k8s.io/klog/v2\">klog</a> package.</p>\n\n<p>Note: The logger setup can also be specified via the <code class=\"language-plaintext highlighter-rouge\">core.klog</code> configuration\nfile options. However, the command line flags take precedence over any\ncorresponding config file options specified.</p>\n\n<h4 id=\"-add_dir_header\">-add_dir_header</h4>\n\n<p>If true, adds the file directory to the header of the log messages.</p>\n\n<p>Default: false</p>\n\n<h4 id=\"-alsologtostderr\">-alsologtostderr</h4>\n\n<p>Log to standard error as well as files.</p>\n\n<p>Default: false</p>\n\n<h4 id=\"-log_backtrace_at\">-log_backtrace_at</h4>\n\n<p>When logging hits line file:N, emit a stack trace.</p>\n\n<p>Default: <em>empty</em></p>\n\n<h4 id=\"-log_dir\">-log_dir</h4>\n\n<p>If non-empty, write log files in this directory.</p>\n\n<p>Default: <em>empty</em></p>\n\n<h4 id=\"-log_file\">-log_file</h4>\n\n<p>If non-empty, use this log file.</p>\n\n<p>Default: <em>empty</em></p>\n\n<h4 id=\"-log_file_max_size\">-log_file_max_size</h4>\n\n<p>Defines the maximum size a log file can grow to. Unit is megabytes. If the\nvalue is 0, the maximum file size is unlimited.</p>\n\n<p>Default: 1800</p>\n\n<h4 id=\"-logtostderr\">-logtostderr</h4>\n\n<p>Log to standard error instead of files</p>\n\n<p>Default: true</p>\n\n<h4 id=\"-skip_headers\">-skip_headers</h4>\n\n<p>If true, avoid header prefixes in the log messages.</p>\n\n<p>Default: false</p>\n\n<h4 id=\"-skip_log_headers\">-skip_log_headers</h4>\n\n<p>If true, avoid headers when opening log files.</p>\n\n<p>Default: false</p>\n\n<h4 id=\"-stderrthreshold\">-stderrthreshold</h4>\n\n<p>Logs at or above this threshold go to stderr.</p>\n\n<p>Default: 2</p>\n\n<h4 id=\"-v\">-v</h4>\n\n<p>Number for the log level verbosity.</p>\n\n<p>Default: 0</p>\n\n<h4 id=\"-vmodule\">-vmodule</h4>\n\n<p>Comma-separated list of <code class=\"language-plaintext highlighter-rouge\">pattern=N</code> settings for file-filtered logging.</p>\n\n<p>Default: <em>empty</em></p>\n","dir":"/reference/","name":"worker-commandline-reference.md","path":"reference/worker-commandline-reference.md","url":"/reference/worker-commandline-reference.html"},{"title":"Kustomize","layout":"default","sort":2,"content":"<h1 class=\"no_toc\" id=\"deploymenet-with-kustomize\">Deploymenet with Kustomize</h1>\n\n<h2 class=\"no_toc text-delta\" id=\"table-of-contents\">Table of contents</h2>\n\n<ol id=\"markdown-toc\">\n <li><a href=\"#overlays\" id=\"markdown-toc-overlays\">Overlays</a> <ol>\n <li><a href=\"#master-worker-pod\" id=\"markdown-toc-master-worker-pod\">Master-worker pod</a></li>\n <li><a href=\"#worker-one-shot\" id=\"markdown-toc-worker-one-shot\">Worker one-shot</a></li>\n <li><a href=\"#master-worker-topologyupdater\" id=\"markdown-toc-master-worker-topologyupdater\">Master Worker Topologyupdater</a></li>\n <li><a href=\"#topologyupdater\" id=\"markdown-toc-topologyupdater\">Topologyupdater</a></li>\n </ol>\n </li>\n <li><a href=\"#uninstallation\" id=\"markdown-toc-uninstallation\">Uninstallation</a></li>\n</ol>\n\n<hr />\n\n<p><a href=\"https://github.com/kubernetes-sigs/kustomize\">Kustomize</a> provides easy\ndeployment of NFD. Customization of the deployment is done by maintaining\ndeclarative overlays on top of the base overlays in NFD.</p>\n\n<p>To follow the deployment instructions here,\n<a href=\"https://kubernetes.io/docs/tasks/tools/install-kubectl\">kubectl</a> v1.21 or\nlater is required.</p>\n\n<p>The kustomize overlays provided in the repo can be used directly:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>kubectl apply <span class=\"nt\">-k</span> https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref<span class=\"o\">=</span>v0.13.6\n</code></pre> </div></div>\n\n<p>This will required RBAC rules and deploy nfd-master (as a deployment) and\nnfd-worker (as daemonset) in the <code class=\"language-plaintext highlighter-rouge\">node-feature-discovery</code> namespace.</p>\n\n<p><strong>NOTE:</strong> nfd-topology-updater is not deployed as part of the <code class=\"language-plaintext highlighter-rouge\">default</code> overlay.\nPlease refer to the <a href=\"#master-worker-topologyupdater\">Master Worker Topologyupdater</a>\nand <a href=\"#topologyupdater\">Topologyupdater</a> below.</p>\n\n<p>Alternatively you can clone the repository and customize the deployment by\ncreating your own overlays. For example, to deploy the\n<a href=\"/node-feature-discovery/v0.13/deployment/image-variants.html#minimal\">minimal</a> image. See <a href=\"https://github.com/kubernetes-sigs/kustomize\">kustomize</a> for more\ninformation about managing deployment configurations.</p>\n\n<h2 id=\"overlays\">Overlays</h2>\n\n<p>The NFD repository hosts a set of overlays for different usages and deployment\nscenarios under\n<a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.13.6/deployment/overlays\"><code class=\"language-plaintext highlighter-rouge\">deployment/overlays</code></a></p>\n\n<ul>\n <li><a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.13.6/deployment/overlays/default\"><code class=\"language-plaintext highlighter-rouge\">default</code></a>:\ndefault deployment of nfd-worker as a daemonset, described above</li>\n <li><a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.13.6/deployment/overlays/default-combined\"><code class=\"language-plaintext highlighter-rouge\">default-combined</code></a>\nsee <a href=\"#master-worker-pod\">Master-worker pod</a> below</li>\n <li><a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.13.6/deployment/overlays/default-job\"><code class=\"language-plaintext highlighter-rouge\">default-job</code></a>:\nsee <a href=\"#worker-one-shot\">Worker one-shot</a> below</li>\n <li><a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.13.6/deployment/overlays/master-worker-topologyupdater\"><code class=\"language-plaintext highlighter-rouge\">master-worker-topologyupdater</code></a>:\nsee <a href=\"#master-worker-topologyupdater\">Master Worker Topologyupdater</a> below</li>\n <li><a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.13.6/deployment/overlays/topologyupdater\"><code class=\"language-plaintext highlighter-rouge\">topologyupdater</code></a>:\nsee <a href=\"#topologyupdater\">Topology Updater</a> below</li>\n <li><a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.13.6/deployment/overlays/prune\"><code class=\"language-plaintext highlighter-rouge\">prune</code></a>:\nclean up the cluster after uninstallation, see\n<a href=\"/node-feature-discovery/v0.13/deployment/uninstallation.html#removing-feature-labels\">Removing feature labels</a></li>\n <li><a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.13.6/deployment/overlays/samples/cert-manager\"><code class=\"language-plaintext highlighter-rouge\">samples/cert-manager</code></a>:\nan example for supplementing the default deployment with cert-manager for TLS\nauthentication, see\n<a href=\"tls\">Automated TLS certificate management using cert-manager</a>\nfor details</li>\n <li><a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.13.6/deployment/overlays/samples/custom-rules\"><code class=\"language-plaintext highlighter-rouge\">samples/custom-rules</code></a>:\nan example for spicing up the default deployment with a separately managed\nconfigmap of custom labeling rules, see\n<a href=\"/node-feature-discovery/v0.13/usage/features.html#custom\">Custom feature source</a> for more information about\ncustom node labels</li>\n</ul>\n\n<h3 id=\"master-worker-pod\">Master-worker pod</h3>\n\n<p>You can also run nfd-master and nfd-worker inside the same pod</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>kubectl apply <span class=\"nt\">-k</span> https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default-combined?ref<span class=\"o\">=</span>v0.13.6\n\n</code></pre> </div></div>\n\n<p>This creates a DaemonSet that runs nfd-worker and nfd-master in the same Pod.\nIn this case no nfd-master is run on the master node(s), but, the worker nodes\nare able to label themselves which may be desirable e.g. in single-node setups.</p>\n\n<p><strong>NOTE:</strong> nfd-topology-updater is not deployed by the default-combined overlay.\nTo enable nfd-topology-updater in this scenario,the users must customize the\ndeployment themselves.</p>\n\n<h3 id=\"worker-one-shot\">Worker one-shot</h3>\n\n<p>Feature discovery can alternatively be configured as a one-shot job.\nThe <code class=\"language-plaintext highlighter-rouge\">default-job</code> overlay may be used to achieve this:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nv\">NUM_NODES</span><span class=\"o\">=</span><span class=\"si\">$(</span>kubectl get no <span class=\"nt\">-o</span> <span class=\"nv\">jsonpath</span><span class=\"o\">=</span><span class=\"s1\">'{.items[*].metadata.name}'</span> | <span class=\"nb\">wc</span> <span class=\"nt\">-w</span><span class=\"si\">)</span>\nkubectl kustomize https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default-job?ref<span class=\"o\">=</span>v0.13.6 | <span class=\"se\">\\</span>\n <span class=\"nb\">sed </span>s<span class=\"s2\">\"/NUM_NODES/</span><span class=\"nv\">$NUM_NODES</span><span class=\"s2\">/\"</span> | <span class=\"se\">\\</span>\n kubectl apply <span class=\"nt\">-f</span> -\n</code></pre> </div></div>\n\n<p>The example above launches as many jobs as there are non-master nodes. Note that\nthis approach does not guarantee running once on every node. For example,\ntainted, non-ready nodes or some other reasons in Job scheduling may cause some\nnode(s) will run extra job instance(s) to satisfy the request.</p>\n\n<h3 id=\"master-worker-topologyupdater\">Master Worker Topologyupdater</h3>\n\n<p>NFD-Master, nfd-worker and nfd-topology-updater can be configured to be\ndeployed as separate pods. The <code class=\"language-plaintext highlighter-rouge\">master-worker-topologyupdater</code> overlay may be\nused to achieve this:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>kubectl apply <span class=\"nt\">-k</span> https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/master-worker-topologyupdater?ref<span class=\"o\">=</span>v0.13.6\n\n</code></pre> </div></div>\n\n<h3 id=\"topologyupdater\">Topologyupdater</h3>\n\n<p>In order to deploy just nfd-topology-updater (without nfd-master and nfd-worker)\nuse the <code class=\"language-plaintext highlighter-rouge\">topologyupdater</code> overlay:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>kubectl apply <span class=\"nt\">-k</span> https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/topologyupdater?ref<span class=\"o\">=</span>v0.13.6\n\n</code></pre> </div></div>\n\n<p>NFD-Topology-Updater can be configured along with the <code class=\"language-plaintext highlighter-rouge\">default</code> overlay\n(which deploys nfd-worker and nfd-master) where all the software components\nare deployed as separate pods;</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>\nkubectl apply <span class=\"nt\">-k</span> https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref<span class=\"o\">=</span>v0.13.6\nkubectl apply <span class=\"nt\">-k</span> https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/topologyupdater?ref<span class=\"o\">=</span>v0.13.6\n\n</code></pre> </div></div>\n\n<h2 id=\"uninstallation\">Uninstallation</h2>\n\n<p>Simplest way is to invoke <code class=\"language-plaintext highlighter-rouge\">kubectl delete</code> on the overlay that was used for\ndeployment. Beware that this will also delete the namespace that NFD is\nrunning in. For example, in case the default overlay from the repo was used:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>kubectl delete <span class=\"nt\">-k</span> https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref<span class=\"o\">=</span>v0.13.6\n</code></pre> </div></div>\n\n<p>Alternatively you can delete create objects one-by-one, depending on the type\nof deployment, for example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nv\">NFD_NS</span><span class=\"o\">=</span>node-feature-discovery\nkubectl <span class=\"nt\">-n</span> <span class=\"nv\">$NFD_NS</span> delete ds nfd-worker\nkubectl <span class=\"nt\">-n</span> <span class=\"nv\">$NFD_NS</span> delete deploy nfd-master\nkubectl <span class=\"nt\">-n</span> <span class=\"nv\">$NFD_NS</span> delete svc nfd-master\nkubectl <span class=\"nt\">-n</span> <span class=\"nv\">$NFD_NS</span> delete sa nfd-master\nkubectl delete clusterrole nfd-master\nkubectl delete clusterrolebinding nfd-master\n</code></pre> </div></div>\n\n<!-- Links -->\n","dir":"/deployment/","name":"kustomize.md","path":"deployment/kustomize.md","url":"/deployment/kustomize.html"},{"title":"Deployment","layout":"default","sort":2,"content":"<h1 id=\"deployment\">Deployment</h1>\n\n<p>See <a href=\"image-variants\">Image variants</a> for description of the different NFD\ncontainer images available.</p>\n\n<p><a href=\"kustomize\">Using Kustomize</a> provides straightforward deployment with\n<code class=\"language-plaintext highlighter-rouge\">kubectl</code> integration and declarative customization.</p>\n\n<p><a href=\"helm\">Using Helm</a> provides easy management of NFD deployments with nice\nconfiguration management and easy upgrades.</p>\n\n<p><a href=\"operator\">Using Operator</a> provides deployment and configuration management via\nCRDs.</p>\n","dir":"/deployment/","name":"index.md","path":"deployment/index.md","url":"/deployment/"},{"title":"Quick start","layout":"default","sort":2,"content":"<h1 id=\"quick-start\">Quick start</h1>\n\n<p>Minimal steps to deploy latest released version of NFD in your cluster.</p>\n\n<h2 id=\"installation\">Installation</h2>\n\n<p>Deploy with kustomize – creates a new namespace, service and required RBAC\nrules and deploys nfd-master and nfd-worker daemons.</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>kubectl apply <span class=\"nt\">-k</span> https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref<span class=\"o\">=</span>v0.13.6\n</code></pre> </div></div>\n\n<h2 id=\"verify\">Verify</h2>\n\n<p>Wait until NFD master and NFD worker are running.</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nv\">$ </span>kubectl <span class=\"nt\">-n</span> node-feature-discovery get ds,deploy\nNAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE\ndaemonset.apps/nfd-worker 2 2 2 2 2 <none> 10s\n\nNAME READY UP-TO-DATE AVAILABLE AGE\ndeployment.apps/nfd-master 1/1 1 1 17s\n\n</code></pre> </div></div>\n\n<p>Check that NFD feature labels have been created</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nv\">$ </span>kubectl get no <span class=\"nt\">-o</span> json | jq .items[].metadata.labels\n<span class=\"o\">{</span>\n <span class=\"s2\">\"kubernetes.io/arch\"</span>: <span class=\"s2\">\"amd64\"</span>,\n <span class=\"s2\">\"kubernetes.io/os\"</span>: <span class=\"s2\">\"linux\"</span>,\n <span class=\"s2\">\"feature.node.kubernetes.io/cpu-cpuid.ADX\"</span>: <span class=\"s2\">\"true\"</span>,\n <span class=\"s2\">\"feature.node.kubernetes.io/cpu-cpuid.AESNI\"</span>: <span class=\"s2\">\"true\"</span>,\n <span class=\"s2\">\"feature.node.kubernetes.io/cpu-cpuid.AVX\"</span>: <span class=\"s2\">\"true\"</span>,\n...\n</code></pre> </div></div>\n\n<h2 id=\"use-node-labels\">Use node labels</h2>\n\n<p>Create a pod targeting a distinguishing feature (select a valid feature from\nthe list printed on the previous step)</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nv\">$ </span><span class=\"nb\">cat</span> <span class=\"o\"><<</span> <span class=\"no\">EOF</span><span class=\"sh\"> | kubectl apply -f -\napiVersion: v1\nkind: Pod\nmetadata:\n name: feature-dependent-pod\nspec:\n containers:\n - image: registry.k8s.io/pause\n name: pause\n nodeSelector:\n # Select a valid feature\n feature.node.kubernetes.io/cpu-cpuid.AESNI: 'true'\n</span><span class=\"no\">EOF\n</span>pod/feature-dependent-pod created\n</code></pre> </div></div>\n\n<p>See that the pod is running on a desired node</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nv\">$ </span>kubectl get po feature-dependent-pod <span class=\"nt\">-o</span> wide\nNAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES\nfeature-dependent-pod 1/1 Running 0 23s 10.36.0.4 node-2 <none> <none>\n</code></pre> </div></div>\n\n<h2 id=\"additional-optional-installation-steps\">Additional Optional Installation Steps</h2>\n\n<h3 id=\"deploy-nfd-topology-updater\">Deploy nfd-topology-updater</h3>\n\n<p>In order to deploy nfd-topology-updater use the <code class=\"language-plaintext highlighter-rouge\">topologyupdater</code> kustomize\noverlay.</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>kubectl apply <span class=\"nt\">-k</span> https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/topologyupdater?ref<span class=\"o\">=</span>v0.13.6\n</code></pre> </div></div>\n\n<h3 id=\"verify-nfd-topology-updater\">Verify nfd-topology-updater</h3>\n\n<p>Wait until nfd-topology-updater is running.</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nv\">$ </span>kubectl <span class=\"nt\">-n</span> node-feature-discovery get ds\nNAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE\ndaemonset.apps/nfd-topology-updater 2 2 2 2 2 <none> 5s\n\n</code></pre> </div></div>\n\n<p>Check that the NodeResourceTopology objects are created</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nv\">$ </span>kubectl get noderesourcetopologies.topology.node.k8s.io\nNAME AGE\nkind-control-plane 23s\nkind-worker 23s\n</code></pre> </div></div>\n","dir":"/get-started/","name":"quick-start.md","path":"get-started/quick-start.md","url":"/get-started/quick-start.html"},{"title":"Usage","layout":"default","sort":3,"content":"<h1 id=\"usage\">Usage</h1>\n\n<p>Usage instructions.</p>\n","dir":"/usage/","name":"index.md","path":"usage/index.md","url":"/usage/"},{"title":"NFD-Master","layout":"default","sort":3,"content":"<h1 class=\"no_toc\" id=\"nfd-master\">NFD-Master</h1>\n\n<hr />\n\n<p>NFD-Master is responsible for connecting to the Kubernetes API server and\nupdating node objects. More specifically, it modifies node labels, taints and\nextended resources based on requests from nfd-workers and 3rd party extensions.</p>\n\n<h2 id=\"nodefeature-controller\">NodeFeature controller</h2>\n\n<p><strong>EXPERIMENTAL</strong>\nController for <a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#nodefeature-custom-resource\">NodeFeature</a>\nobjects can be enabled with the\n<a href=\"/node-feature-discovery/v0.13/reference/master-commandline-reference.html#-enable-nodefeature-api\"><code class=\"language-plaintext highlighter-rouge\">-enable-nodefeature-api</code></a>\ncommand line flag. When enabled, features from NodeFeature objects are used as\nthe input for the <a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#nodefeaturerule\">NodeFeatureRule</a>\nprocessing pipeline. In addition, any labels listed in the NodeFeature object\nare created on the node (note the allowed\n<a href=\"/node-feature-discovery/v0.13/usage/customization-guide.html#node-labels\">label namespaces</a> are controlled).</p>\n\n<blockquote>\n <p>NOTE: NodeFeature API must also be enabled in nfd-worker with\nits <a href=\"/node-feature-discovery/v0.13/reference/worker-commandline-reference.html#-enable-nodefeature-api\"><code class=\"language-plaintext highlighter-rouge\">-enable-nodefeature-api</code></a>\nflag.</p>\n</blockquote>\n\n<h2 id=\"nodefeaturerule-controller\">NodeFeatureRule controller</h2>\n\n<p>NFD-Master acts as the controller for\n<a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#nodefeaturerule\">NodeFeatureRule</a> objects.\nIt applies the rules specified in NodeFeatureRule objects on raw feature data\nand creates node labels accordingly. The feature data used as the input can be\nreceived from nfd-worker instances through the gRPC interface or from\n<a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#nodefeature-custom-resource\">NodeFeature</a> objects. The latter\nrequires that the <a href=\"#nodefeature-controller\">NodeFeaure controller</a> has been\nenabled.</p>\n\n<blockquote>\n <p>NOTE: when gRPC is used for communicating the features (the default\nmechanism), (re-)labelling only happens when a request is received from\nnfd-worker. That is, in practice rules are evaluated and labels for each node\nare created on intervals specified by the\n<a href=\"/node-feature-discovery/v0.13/reference/worker-configuration-reference.html#coresleepinterval\"><code class=\"language-plaintext highlighter-rouge\">core.sleepInterval</code></a>\nconfiguration option of nfd-worker instances. This means that modification or\ncreation of NodeFeatureRule objects does not instantly cause the node\nlabels to be updated. Instead, the changes only come visible in node labels\nas nfd-worker instances send their labelling requests. This limitation is not\npresent when gRPC interface is disabled\nand <a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#nodefeature-custom-resource\">NodeFeature</a> API is used.</p>\n</blockquote>\n\n<h2 id=\"master-configuration\">Master configuration</h2>\n\n<p>NFD-Master supports dynamic configuration through a configuration file. The\ndefault location is <code class=\"language-plaintext highlighter-rouge\">/etc/kubernetes/node-feature-discovery/nfd-master.conf</code>,\nbut, this can be changed by specifying the<code class=\"language-plaintext highlighter-rouge\">-config</code> command line flag.\nConfiguration file is re-read whenever it is modified which makes run-time\nre-configuration of nfd-master straightforward.</p>\n\n<p>Master configuration file is read inside the container, and thus, Volumes and\nVolumeMounts are needed to make your configuration available for NFD. The\npreferred method is to use a ConfigMap which provides easy deployment and\nre-configurability.</p>\n\n<p>The provided nfd-master deployment templates create an empty configmap and\nmount it inside the nfd-master containers. In kustomize deployments,\nconfiguration can be edited with:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>kubectl <span class=\"nt\">-n</span> <span class=\"k\">${</span><span class=\"nv\">NFD_NS</span><span class=\"k\">}</span> edit configmap nfd-master-conf\n</code></pre> </div></div>\n\n<p>In Helm deployments,\n<a href=\"/node-feature-discovery/v0.13/deployment/helm.html#master-pod-parameters\">Master pod parameter</a>\n<code class=\"language-plaintext highlighter-rouge\">master.config</code> can be used to edit the respective configuration.</p>\n\n<p>See\n<a href=\"/node-feature-discovery/v0.13/reference/master-configuration-reference.html\">nfd-master configuration file reference</a>\nfor more details.\nThe (empty-by-default)\n<a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.13.6/deployment/components/master-config/nfd-master.conf.example\">example config</a>\ncontains all available configuration options and can be used as a reference\nfor creating a configuration.</p>\n\n<h2 id=\"deployment-notes\">Deployment notes</h2>\n\n<p>NFD-Master runs as a deployment, by default\nit prefers running on the cluster’s master nodes but will run on worker\nnodes if no master nodes are found.</p>\n\n<p>For High Availability, you should simply increase the replica count of\nthe deployment object. You should also look into adding\n<a href=\"https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity\">inter-pod</a>\naffinity to prevent masters from running on the same node.\nHowever note that inter-pod affinity is costly and is not recommended\nin bigger clusters.</p>\n\n<blockquote>\n <p>NOTE: If the <a href=\"#nodefeature-controller\">NodeFeature controller</a> is enabled the\nreplica count should be 1.</p>\n</blockquote>\n\n<p>If you have RBAC authorization enabled (as is the default e.g. with clusters\ninitialized with kubeadm) you need to configure the appropriate ClusterRoles,\nClusterRoleBindings and a ServiceAccount in order for NFD to create node\nlabels. The provided template will configure these for you.</p>\n","dir":"/usage/","name":"nfd-master.md","path":"usage/nfd-master.md","url":"/usage/nfd-master.html"},{"title":"Master config reference","layout":"default","sort":3,"content":"<h1 class=\"no_toc\" id=\"configuration-file-reference-of-nfd-master\">Configuration file reference of nfd-master</h1>\n\n<h2 class=\"no_toc text-delta\" id=\"table-of-contents\">Table of contents</h2>\n\n<ol id=\"markdown-toc\">\n <li><a href=\"#nopublish\" id=\"markdown-toc-nopublish\">noPublish</a></li>\n <li><a href=\"#extralabelns\" id=\"markdown-toc-extralabelns\">extraLabelNs</a></li>\n <li><a href=\"#denylabelns\" id=\"markdown-toc-denylabelns\">denyLabelNs</a></li>\n <li><a href=\"#resourcelabels\" id=\"markdown-toc-resourcelabels\">resourceLabels</a></li>\n <li><a href=\"#enabletaints\" id=\"markdown-toc-enabletaints\">enableTaints</a></li>\n <li><a href=\"#labelwhitelist\" id=\"markdown-toc-labelwhitelist\">labelWhiteList</a></li>\n</ol>\n\n<hr />\n\n<p>See the\n<a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.13.6/deployment/components/master-config/nfd-master.conf.example\">sample configuration file</a>\nfor a full example configuration.</p>\n\n<h2 id=\"nopublish\">noPublish</h2>\n\n<p><code class=\"language-plaintext highlighter-rouge\">noPublish</code> option disables updates to the Node objects in the Kubernetes\nAPI server, making a “dry-run” flag for nfd-master. No Labels, Annotations, Taints\nor ExtendedResources of nodes are updated.</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">false</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">noPublish</span><span class=\"pi\">:</span> <span class=\"no\">true</span>\n</code></pre> </div></div>\n\n<h2 id=\"extralabelns\">extraLabelNs</h2>\n<p><code class=\"language-plaintext highlighter-rouge\">extraLabelNs</code> specifies a list of allowed feature\nlabel namespaces. This option can be used to allow\nother vendor or application specific namespaces for custom labels from the\nlocal and custom feature sources, even though these labels were denied using\nthe <code class=\"language-plaintext highlighter-rouge\">denyLabelNs</code> parameter.</p>\n\n<p>The same namespace control and this option applies to Extended Resources (created\nwith <code class=\"language-plaintext highlighter-rouge\">resourceLabels</code>), too.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">extraLabelNs</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">added.ns.io\"</span><span class=\"pi\">,</span><span class=\"s2\">\"</span><span class=\"s\">added.kubernets.io\"</span><span class=\"pi\">]</span>\n</code></pre> </div></div>\n\n<h2 id=\"denylabelns\">denyLabelNs</h2>\n<p><code class=\"language-plaintext highlighter-rouge\">denyLabelNs</code> specifies a list of excluded\nlabel namespaces. By default, nfd-master allows creating labels in all\nnamespaces, excluding <code class=\"language-plaintext highlighter-rouge\">kubernetes.io</code> namespace and its sub-namespaces\n(i.e. <code class=\"language-plaintext highlighter-rouge\">*.kubernetes.io</code>). However, you should note that\n<code class=\"language-plaintext highlighter-rouge\">kubernetes.io</code> and its sub-namespaces are always denied.\nThis option can be used to exclude some vendors or application specific\nnamespaces.\nNote that the namespaces <code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io</code> and <code class=\"language-plaintext highlighter-rouge\">profile.node.kubernetes.io</code>\nand their sub-namespaces are always allowed and cannot be denied.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">denyLabelNs</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">denied.ns.io\"</span><span class=\"pi\">,</span><span class=\"s2\">\"</span><span class=\"s\">denied.kubernetes.io\"</span><span class=\"pi\">]</span>\n</code></pre> </div></div>\n\n<h2 id=\"resourcelabels\">resourceLabels</h2>\n\n<p><strong>DEPRECATED</strong>: <a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#nodefeaturerule\">NodeFeatureRule</a>\nshould be used for managing extended resources in NFD.</p>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">resourceLabels</code> option specifies a list of features to be\nadvertised as extended resources instead of labels. Features that have integer\nvalues can be published as Extended Resources by listing them in this option.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">resourceLabels</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">vendor-1.com/feature-1\"</span><span class=\"pi\">,</span><span class=\"s2\">\"</span><span class=\"s\">vendor-2.io/feature-2\"</span><span class=\"pi\">]</span>\n</code></pre> </div></div>\n\n<h2 id=\"enabletaints\">enableTaints</h2>\n<p><code class=\"language-plaintext highlighter-rouge\">enableTaints</code> enables/disables node tainting feature of NFD.</p>\n\n<p>Default: <em>false</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">enableTaints</span><span class=\"pi\">:</span> <span class=\"no\">true</span>\n</code></pre> </div></div>\n\n<h2 id=\"labelwhitelist\">labelWhiteList</h2>\n<p><code class=\"language-plaintext highlighter-rouge\">labelWhiteList</code> specifies a regular expression for filtering feature\nlabels based on their name. Each label must match against the given reqular\nexpression in order to be published.</p>\n\n<p>Note: The regular expression is only matches against the “basename” part of the\nlabel, i.e. to the part of the name after ‘/’. The label namespace is omitted.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">labelWhiteList</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">foo\"</span>\n</code></pre> </div></div>\n","dir":"/reference/","name":"master-configuration-reference.md","path":"reference/master-configuration-reference.md","url":"/reference/master-configuration-reference.html"},{"title":"Helm","layout":"default","sort":3,"content":"<h1 class=\"no_toc\" id=\"deployment-with-helm\">Deployment with Helm</h1>\n\n<h2 class=\"no_toc text-delta\" id=\"table-of-contents\">Table of contents</h2>\n\n<ol id=\"markdown-toc\">\n <li><a href=\"#prerequisites\" id=\"markdown-toc-prerequisites\">Prerequisites</a></li>\n <li><a href=\"#deployment\" id=\"markdown-toc-deployment\">Deployment</a></li>\n <li><a href=\"#configuration\" id=\"markdown-toc-configuration\">Configuration</a></li>\n <li><a href=\"#uninstalling-the-chart\" id=\"markdown-toc-uninstalling-the-chart\">Uninstalling the chart</a></li>\n <li><a href=\"#chart-parameters\" id=\"markdown-toc-chart-parameters\">Chart parameters</a> <ol>\n <li><a href=\"#general-parameters\" id=\"markdown-toc-general-parameters\">General parameters</a></li>\n <li><a href=\"#master-pod-parameters\" id=\"markdown-toc-master-pod-parameters\">Master pod parameters</a></li>\n <li><a href=\"#worker-pod-parameters\" id=\"markdown-toc-worker-pod-parameters\">Worker pod parameters</a></li>\n <li><a href=\"#topology-updater-parameters\" id=\"markdown-toc-topology-updater-parameters\">Topology updater parameters</a></li>\n <li><a href=\"#topology-garbage-collector-parameters\" id=\"markdown-toc-topology-garbage-collector-parameters\">Topology garbage collector parameters</a></li>\n </ol>\n </li>\n</ol>\n\n<hr />\n\n<p>Node Feature Discovery Helm chart allow to easily deploy and manage NFD.</p>\n\n<blockquote>\n <p>NOTE: NFD is not ideal for other Helm charts to depend on as that may result\nin multiple parallel NFD deployments in the same cluster which is not fully\nsupported by the NFD Helm chart.</p>\n</blockquote>\n\n<h2 id=\"prerequisites\">Prerequisites</h2>\n\n<p><a href=\"https://helm.sh/\">Helm package manager</a> should be installed.</p>\n\n<h2 id=\"deployment\">Deployment</h2>\n\n<p>To install the latest stable version:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nb\">export </span><span class=\"nv\">NFD_NS</span><span class=\"o\">=</span>node-feature-discovery\nhelm repo add nfd https://kubernetes-sigs.github.io/node-feature-discovery/charts\nhelm repo update\nhelm <span class=\"nb\">install </span>nfd/node-feature-discovery <span class=\"nt\">--namespace</span> <span class=\"nv\">$NFD_NS</span> <span class=\"nt\">--create-namespace</span> <span class=\"nt\">--generate-name</span>\n</code></pre> </div></div>\n\n<p>To install the latest development version you need to clone the NFD Git\nrepository and install from there.</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>git clone https://github.com/kubernetes-sigs/node-feature-discovery/\n<span class=\"nb\">cd </span>node-feature-discovery/deployment/helm\n<span class=\"nb\">export </span><span class=\"nv\">NFD_NS</span><span class=\"o\">=</span>node-feature-discovery\nhelm <span class=\"nb\">install </span>node-feature-discovery ./node-feature-discovery/ <span class=\"nt\">--namespace</span> <span class=\"nv\">$NFD_NS</span> <span class=\"nt\">--create-namespace</span>\n</code></pre> </div></div>\n\n<p>See the <a href=\"#configuration\">configuration</a> section below for instructions how to\nalter the deployment parameters.</p>\n\n<p>In order to deploy the <a href=\"/node-feature-discovery/v0.13/deployment/image-variants.html#minimal\">minimal</a> image you need to\noverride the image tag:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>helm <span class=\"nb\">install </span>node-feature-discovery ./node-feature-discovery/ <span class=\"nt\">--set</span> image.tag<span class=\"o\">=</span>v0.13.6-minimal <span class=\"nt\">--namespace</span> <span class=\"nv\">$NFD_NS</span> <span class=\"nt\">--create-namespace</span>\n</code></pre> </div></div>\n\n<h2 id=\"configuration\">Configuration</h2>\n\n<p>You can override values from <code class=\"language-plaintext highlighter-rouge\">values.yaml</code> and provide a file with custom values:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nb\">export </span><span class=\"nv\">NFD_NS</span><span class=\"o\">=</span>node-feature-discovery\nhelm <span class=\"nb\">install </span>nfd/node-feature-discovery <span class=\"nt\">-f</span> <path/to/custom/values.yaml> <span class=\"nt\">--namespace</span> <span class=\"nv\">$NFD_NS</span> <span class=\"nt\">--create-namespace</span>\n</code></pre> </div></div>\n\n<p>To specify each parameter separately you can provide them to helm install command:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nb\">export </span><span class=\"nv\">NFD_NS</span><span class=\"o\">=</span>node-feature-discovery\nhelm <span class=\"nb\">install </span>nfd/node-feature-discovery <span class=\"nt\">--set</span> <span class=\"nv\">nameOverride</span><span class=\"o\">=</span>NFDinstance <span class=\"nt\">--set</span> master.replicaCount<span class=\"o\">=</span>2 <span class=\"nt\">--namespace</span> <span class=\"nv\">$NFD_NS</span> <span class=\"nt\">--create-namespace</span>\n</code></pre> </div></div>\n\n<h2 id=\"uninstalling-the-chart\">Uninstalling the chart</h2>\n\n<p>To uninstall the <code class=\"language-plaintext highlighter-rouge\">node-feature-discovery</code> deployment:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nb\">export </span><span class=\"nv\">NFD_NS</span><span class=\"o\">=</span>node-feature-discovery\nhelm uninstall node-feature-discovery <span class=\"nt\">--namespace</span> <span class=\"nv\">$NFD_NS</span>\n</code></pre> </div></div>\n\n<p>The command removes all the Kubernetes components associated with the chart and\ndeletes the release.</p>\n\n<h2 id=\"chart-parameters\">Chart parameters</h2>\n\n<p>In order to tailor the deployment of the Node Feature Discovery to your cluster needs\nWe have introduced the following Chart parameters.</p>\n\n<h3 id=\"general-parameters\">General parameters</h3>\n\n<table>\n <thead>\n <tr>\n <th>Name</th>\n <th>Type</th>\n <th>Default</th>\n <th>description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">image.repository</code></td>\n <td>string</td>\n <td><code class=\"language-plaintext highlighter-rouge\">registry.k8s.io/nfd/node-feature-discovery</code></td>\n <td>NFD image repository</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">image.tag</code></td>\n <td>string</td>\n <td><code class=\"language-plaintext highlighter-rouge\">v0.13.6</code></td>\n <td>NFD image tag</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">image.pullPolicy</code></td>\n <td>string</td>\n <td><code class=\"language-plaintext highlighter-rouge\">Always</code></td>\n <td>Image pull policy</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">imagePullSecrets</code></td>\n <td>list</td>\n <td>[]</td>\n <td>ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. <a href=\"https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod\">More info</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">nameOverride</code></td>\n <td>string</td>\n <td> </td>\n <td>Override the name of the chart</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">fullnameOverride</code></td>\n <td>string</td>\n <td> </td>\n <td>Override a default fully qualified app name</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">tls.enable</code></td>\n <td>bool</td>\n <td>false</td>\n <td>Specifies whether to use TLS for communications between components</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">tls.certManager</code></td>\n <td>bool</td>\n <td>false</td>\n <td>If enabled, requires <a href=\"https://cert-manager.io/docs/\">cert-manager</a> to be installed and will automatically create the required TLS certificates</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">enableNodeFeatureApi</code></td>\n <td>bool</td>\n <td>false</td>\n <td>Enable the <a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#nodefeature\">NodeFeature</a> CRD API for communicating node features. This will automatically disable the gRPC communication.</td>\n </tr>\n </tbody>\n</table>\n\n<h3 id=\"master-pod-parameters\">Master pod parameters</h3>\n\n<table>\n <thead>\n <tr>\n <th>Name</th>\n <th>Type</th>\n <th>Default</th>\n <th>description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.*</code></td>\n <td>dict</td>\n <td> </td>\n <td>NFD master deployment configuration</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.port</code></td>\n <td>integer</td>\n <td> </td>\n <td>Specifies the TCP port that nfd-master listens for incoming requests.</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.instance</code></td>\n <td>string</td>\n <td> </td>\n <td>Instance name. Used to separate annotation namespaces for multiple parallel deployments</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.extraLabelNs</code></td>\n <td>array</td>\n <td>[]</td>\n <td>List of allowed extra label namespaces</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.resourceLabels</code></td>\n <td>array</td>\n <td>[]</td>\n <td>List of labels to be registered as extended resources</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.enableTaints</code></td>\n <td>bool</td>\n <td>false</td>\n <td>Specifies whether to enable or disable node tainting</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.crdController</code></td>\n <td>bool</td>\n <td>null</td>\n <td>Specifies whether the NFD CRD API controller is enabled. If not set, controller will be enabled if <code class=\"language-plaintext highlighter-rouge\">master.instance</code> is empty.</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.featureRulesController</code></td>\n <td>bool</td>\n <td>null</td>\n <td>DEPRECATED: use <code class=\"language-plaintext highlighter-rouge\">master.crdController</code> instead</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.replicaCount</code></td>\n <td>integer</td>\n <td>1</td>\n <td>Number of desired pods. This is a pointer to distinguish between explicit zero and not specified</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.podSecurityContext</code></td>\n <td>dict</td>\n <td>{}</td>\n <td><a href=\"https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod\">PodSecurityContext</a> holds pod-level security attributes and common container settings</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.securityContext</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Container <a href=\"https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container\">security settings</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.serviceAccount.create</code></td>\n <td>bool</td>\n <td>true</td>\n <td>Specifies whether a service account should be created</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.serviceAccount.annotations</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Annotations to add to the service account</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.serviceAccount.name</code></td>\n <td>string</td>\n <td> </td>\n <td>The name of the service account to use. If not set and create is true, a name is generated using the fullname template</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.rbac.create</code></td>\n <td>bool</td>\n <td>true</td>\n <td>Specifies whether to create <a href=\"https://kubernetes.io/docs/reference/access-authn-authz/rbac/\">RBAC</a> configuration for nfd-master</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.service.type</code></td>\n <td>string</td>\n <td>ClusterIP</td>\n <td>NFD master service type</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.service.port</code></td>\n <td>integer</td>\n <td>8080</td>\n <td>NFD master service port</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.resources</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>NFD master pod <a href=\"https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/\">resources management</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.nodeSelector</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>NFD master pod <a href=\"https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector\">node selector</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.tolerations</code></td>\n <td>dict</td>\n <td><em>Scheduling to master node is disabled</em></td>\n <td>NFD master pod <a href=\"https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/\">tolerations</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.annotations</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>NFD master pod <a href=\"https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/\">annotations</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.affinity</code></td>\n <td>dict</td>\n <td> </td>\n <td>NFD master pod required <a href=\"https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/\">node affinity</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.deploymentAnnotations</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>NFD master deployment <a href=\"https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/\">annotations</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.config</code></td>\n <td>dict</td>\n <td> </td>\n <td>NFD master <a href=\"../reference/master-configuration-reference\">configuration</a></td>\n </tr>\n </tbody>\n</table>\n\n<h3 id=\"worker-pod-parameters\">Worker pod parameters</h3>\n\n<table>\n <thead>\n <tr>\n <th>Name</th>\n <th>Type</th>\n <th>Default</th>\n <th>description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">worker.*</code></td>\n <td>dict</td>\n <td> </td>\n <td>NFD worker daemonset configuration</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">worker.config</code></td>\n <td>dict</td>\n <td> </td>\n <td>NFD worker <a href=\"../reference/worker-configuration-reference\">configuration</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">worker.podSecurityContext</code></td>\n <td>dict</td>\n <td>{}</td>\n <td><a href=\"https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod\">PodSecurityContext</a> holds pod-level security attributes and common container settings</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">worker.securityContext</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Container <a href=\"https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container\">security settings</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">worker.serviceAccount.create</code></td>\n <td>bool</td>\n <td>true</td>\n <td>Specifies whether a service account for nfd-worker should be created</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">worker.serviceAccount.annotations</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Annotations to add to the service account for nfd-worker</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">worker.serviceAccount.name</code></td>\n <td>string</td>\n <td> </td>\n <td>The name of the service account to use for nfd-worker. If not set and create is true, a name is generated using the fullname template (suffixed with <code class=\"language-plaintext highlighter-rouge\">-worker</code>)</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">worker.rbac.create</code></td>\n <td>bool</td>\n <td>true</td>\n <td>Specifies whether to create <a href=\"https://kubernetes.io/docs/reference/access-authn-authz/rbac/\">RBAC</a> configuration for nfd-worker</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">worker.mountUsrSrc</code></td>\n <td>bool</td>\n <td>false</td>\n <td>Specifies whether to allow users to mount the hostpath /user/src. Does not work on systems without /usr/src AND a read-only /usr</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">worker.resources</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>NFD worker pod <a href=\"https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/\">resources management</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">worker.nodeSelector</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>NFD worker pod <a href=\"https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector\">node selector</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">worker.tolerations</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>NFD worker pod <a href=\"https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/\">node tolerations</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">worker.priorityClassName</code></td>\n <td>string</td>\n <td> </td>\n <td>NFD worker pod <a href=\"https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/\">priority class</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">worker.annotations</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>NFD worker pod <a href=\"https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/\">annotations</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">worker.daemonsetAnnotations</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>NFD worker daemonset <a href=\"https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/\">annotations</a></td>\n </tr>\n </tbody>\n</table>\n\n<h3 id=\"topology-updater-parameters\">Topology updater parameters</h3>\n\n<table>\n <thead>\n <tr>\n <th>Name</th>\n <th>Type</th>\n <th>Default</th>\n <th>description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.*</code></td>\n <td>dict</td>\n <td> </td>\n <td>NFD Topology Updater configuration</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.enable</code></td>\n <td>bool</td>\n <td>false</td>\n <td>Specifies whether the NFD Topology Updater should be created</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.createCRDs</code></td>\n <td>bool</td>\n <td>false</td>\n <td>Specifies whether the NFD Topology Updater CRDs should be created</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.serviceAccount.create</code></td>\n <td>bool</td>\n <td>true</td>\n <td>Specifies whether the service account for topology updater should be created</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.serviceAccount.annotations</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Annotations to add to the service account for topology updater</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.serviceAccount.name</code></td>\n <td>string</td>\n <td> </td>\n <td>The name of the service account for topology updater to use. If not set and create is true, a name is generated using the fullname template and <code class=\"language-plaintext highlighter-rouge\">-topology-updater</code> suffix</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.rbac.create</code></td>\n <td>bool</td>\n <td>true</td>\n <td>Specifies whether to create <a href=\"https://kubernetes.io/docs/reference/access-authn-authz/rbac/\">RBAC</a> configuration for topology updater</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.kubeletConfigPath</code></td>\n <td>string</td>\n <td>””</td>\n <td>Specifies the kubelet config host path</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.kubeletPodResourcesSockPath</code></td>\n <td>string</td>\n <td>””</td>\n <td>Specifies the kubelet sock path to read pod resources</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.updateInterval</code></td>\n <td>string</td>\n <td>60s</td>\n <td>Time to sleep between CR updates. Non-positive value implies no CR update.</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.watchNamespace</code></td>\n <td>string</td>\n <td><code class=\"language-plaintext highlighter-rouge\">*</code></td>\n <td>Namespace to watch pods, <code class=\"language-plaintext highlighter-rouge\">*</code> for all namespaces</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.podSecurityContext</code></td>\n <td>dict</td>\n <td>{}</td>\n <td><a href=\"https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod\">PodSecurityContext</a> holds pod-level security attributes and common container settings</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.securityContext</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Container <a href=\"https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container\">security settings</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.resources</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Topology updater pod <a href=\"https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/\">resources management</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.nodeSelector</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Topology updater pod <a href=\"https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector\">node selector</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.tolerations</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Topology updater pod <a href=\"https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/\">node tolerations</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.annotations</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Topology updater pod <a href=\"https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/\">annotations</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.affinity</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Topology updater pod <a href=\"https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/\">affinity</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.config</code></td>\n <td>dict</td>\n <td> </td>\n <td><a href=\"../reference/topology-updater-configuration-reference\">configuration</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.podSetFingerprint</code></td>\n <td>bool</td>\n <td>false</td>\n <td>Enables compute and report of pod fingerprint in NRT objects.</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyUpdater.kubeletStateDir</code></td>\n <td>string</td>\n <td>/var/lib/kubelet</td>\n <td>Specifies kubelet state directory path for watching state and checkpoint files. Empty value disables kubelet state tracking.</td>\n </tr>\n </tbody>\n</table>\n\n<h3 id=\"topology-garbage-collector-parameters\">Topology garbage collector parameters</h3>\n\n<table>\n <thead>\n <tr>\n <th>Name</th>\n <th>Type</th>\n <th>Default</th>\n <th>description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyGC.*</code></td>\n <td>dict</td>\n <td> </td>\n <td>NFD Topology Garbage Collector configuration</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyGC.enable</code></td>\n <td>bool</td>\n <td>true</td>\n <td>Specifies whether the NFD Topology Garbage Collector should be created</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyGC.serviceAccount.create</code></td>\n <td>bool</td>\n <td>true</td>\n <td>Specifies whether the service account for topology garbage collector should be created</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyGC.serviceAccount.annotations</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Annotations to add to the service account for topology garbage collector</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyGC.serviceAccount.name</code></td>\n <td>string</td>\n <td> </td>\n <td>The name of the service account for topology garbage collector to use. If not set and create is true, a name is generated using the fullname template and <code class=\"language-plaintext highlighter-rouge\">-topology-gc</code> suffix</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyGC.rbac.create</code></td>\n <td>bool</td>\n <td>true</td>\n <td>Specifies whether to create <a href=\"https://kubernetes.io/docs/reference/access-authn-authz/rbac/\">RBAC</a> configuration for topology garbage collector</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyGC.interval</code></td>\n <td>string</td>\n <td>1h</td>\n <td>Time between periodic garbage collector runs</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyGC.podSecurityContext</code></td>\n <td>dict</td>\n <td>{}</td>\n <td><a href=\"https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod\">PodSecurityContext</a> holds pod-level security attributes and common container settings</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyGC.securityContext</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Container <a href=\"https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container\">security settings</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyGC.resources</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Topology garbage collector pod <a href=\"https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/\">resources management</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyGC.nodeSelector</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Topology garbage collector pod <a href=\"https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector\">node selector</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyGC.tolerations</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Topology garbage collector pod <a href=\"https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/\">node tolerations</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyGC.annotations</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Topology garbage collector pod <a href=\"https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/\">annotations</a></td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">topologyGC.affinity</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Topology garbage collector pod <a href=\"https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/\">affinity</a></td>\n </tr>\n </tbody>\n</table>\n\n<!-- Links -->\n","dir":"/deployment/","name":"helm.md","path":"deployment/helm.md","url":"/deployment/helm.html"},{"title":"Reference","layout":"default","sort":4,"content":"<h1 id=\"reference\">Reference</h1>\n\n<p>Command line and configuration reference.</p>\n","dir":"/reference/","name":"index.md","path":"reference/index.md","url":"/reference/"},{"title":"Worker config reference","layout":"default","sort":4,"content":"<h1 class=\"no_toc\" id=\"configuration-file-reference-of-nfd-worker\">Configuration file reference of nfd-worker</h1>\n\n<h2 class=\"no_toc text-delta\" id=\"table-of-contents\">Table of contents</h2>\n\n<ol id=\"markdown-toc\">\n <li><a href=\"#core\" id=\"markdown-toc-core\">core</a> <ol>\n <li><a href=\"#coresleepinterval\" id=\"markdown-toc-coresleepinterval\">core.sleepInterval</a></li>\n <li><a href=\"#corefeaturesources\" id=\"markdown-toc-corefeaturesources\">core.featureSources</a></li>\n <li><a href=\"#corelabelsources\" id=\"markdown-toc-corelabelsources\">core.labelSources</a></li>\n <li><a href=\"#coresources\" id=\"markdown-toc-coresources\">core.sources</a></li>\n <li><a href=\"#corelabelwhitelist\" id=\"markdown-toc-corelabelwhitelist\">core.labelWhiteList</a></li>\n <li><a href=\"#corenopublish\" id=\"markdown-toc-corenopublish\">core.noPublish</a></li>\n <li><a href=\"#coreklog\" id=\"markdown-toc-coreklog\">core.klog</a></li>\n </ol>\n </li>\n <li><a href=\"#sources\" id=\"markdown-toc-sources\">sources</a> <ol>\n <li><a href=\"#sourcescpu\" id=\"markdown-toc-sourcescpu\">sources.cpu</a></li>\n <li><a href=\"#sourceskernel\" id=\"markdown-toc-sourceskernel\">sources.kernel</a></li>\n <li><a href=\"#sourceslocal\" id=\"markdown-toc-sourceslocal\">sources.local</a></li>\n <li><a href=\"#sourceslocalhooksenabled\" id=\"markdown-toc-sourceslocalhooksenabled\">sources.local.hooksEnabled</a></li>\n <li><a href=\"#sourcespci\" id=\"markdown-toc-sourcespci\">sources.pci</a></li>\n <li><a href=\"#sourcesusb\" id=\"markdown-toc-sourcesusb\">sources.usb</a></li>\n <li><a href=\"#sourcescustom\" id=\"markdown-toc-sourcescustom\">sources.custom</a></li>\n </ol>\n </li>\n</ol>\n\n<hr />\n\n<p>See the\n<a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.13.6/deployment/components/worker-config/nfd-worker.conf.example\">sample configuration file</a>\nfor a full example configuration.</p>\n\n<h2 id=\"core\">core</h2>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">core</code> section contains common configuration settings that are not specific\nto any particular feature source.</p>\n\n<h3 id=\"coresleepinterval\">core.sleepInterval</h3>\n\n<p><code class=\"language-plaintext highlighter-rouge\">core.sleepInterval</code> specifies the interval between consecutive passes of\nfeature (re-)detection, and thus also the interval between node re-labeling. A\nnon-positive value implies infinite sleep interval, i.e. no re-detection or\nre-labeling is done.</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">60s</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">core</span><span class=\"pi\">:</span>\n <span class=\"na\">sleepInterval</span><span class=\"pi\">:</span> <span class=\"s\">60s</span>\n</code></pre> </div></div>\n\n<h3 id=\"corefeaturesources\">core.featureSources</h3>\n\n<p><code class=\"language-plaintext highlighter-rouge\">core.featureSources</code> specifies the list of enabled feature sources. A special\nvalue <code class=\"language-plaintext highlighter-rouge\">all</code> enables all sources. Prefixing a source name with <code class=\"language-plaintext highlighter-rouge\">-</code> indicates\nthat the source will be disabled instead - this is only meaningful when used in\nconjunction with <code class=\"language-plaintext highlighter-rouge\">all</code>. This option allows completely disabling the feature\ndetection so that neither standard feature labels are generated nor the raw\nfeature data is available for custom rule processing.</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">[all]</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">core</span><span class=\"pi\">:</span>\n <span class=\"c1\"># Enable all but cpu and local sources</span>\n <span class=\"na\">featureSources</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"s2\">\"</span><span class=\"s\">all\"</span>\n <span class=\"pi\">-</span> <span class=\"s2\">\"</span><span class=\"s\">-cpu\"</span>\n <span class=\"pi\">-</span> <span class=\"s2\">\"</span><span class=\"s\">-local\"</span>\n</code></pre> </div></div>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">core</span><span class=\"pi\">:</span>\n <span class=\"c1\"># Enable only cpu and local sources</span>\n <span class=\"na\">featureSources</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"s2\">\"</span><span class=\"s\">cpu\"</span>\n <span class=\"pi\">-</span> <span class=\"s2\">\"</span><span class=\"s\">local\"</span>\n</code></pre> </div></div>\n\n<h3 id=\"corelabelsources\">core.labelSources</h3>\n\n<p><code class=\"language-plaintext highlighter-rouge\">core.labelSources</code> specifies the list of enabled label sources. A special\nvalue <code class=\"language-plaintext highlighter-rouge\">all</code> enables all sources. Prefixing a source name with <code class=\"language-plaintext highlighter-rouge\">-</code> indicates\nthat the source will be disabled instead - this is only meaningful when used in\nconjunction with <code class=\"language-plaintext highlighter-rouge\">all</code>. This configuration option affects the generation of\nnode labels but not the actual discovery of the underlying feature data that is\nused e.g. in custom/<code class=\"language-plaintext highlighter-rouge\">NodeFeatureRule</code> rules.</p>\n\n<p>Note: Overridden by the <code class=\"language-plaintext highlighter-rouge\">-label-sources</code> command line flag and\nthe <code class=\"language-plaintext highlighter-rouge\">core.sources</code> configurations option (if either of them is specified).</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">[all]</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">core</span><span class=\"pi\">:</span>\n <span class=\"c1\"># Enable all but cpu and system sources</span>\n <span class=\"na\">labelSources</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"s2\">\"</span><span class=\"s\">all\"</span>\n <span class=\"pi\">-</span> <span class=\"s2\">\"</span><span class=\"s\">-cpu\"</span>\n <span class=\"pi\">-</span> <span class=\"s2\">\"</span><span class=\"s\">-system\"</span>\n</code></pre> </div></div>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">core</span><span class=\"pi\">:</span>\n <span class=\"c1\"># Enable only cpu and system sources</span>\n <span class=\"na\">labelSources</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"s2\">\"</span><span class=\"s\">cpu\"</span>\n <span class=\"pi\">-</span> <span class=\"s2\">\"</span><span class=\"s\">system\"</span>\n</code></pre> </div></div>\n\n<h3 id=\"coresources\">core.sources</h3>\n\n<p><strong>DEPRECATED</strong>: use <a href=\"#core.labelSources\"><code class=\"language-plaintext highlighter-rouge\">core.labelSources</code></a> instead.</p>\n\n<p>Note: <code class=\"language-plaintext highlighter-rouge\">core.sources</code> takes precedence over the <code class=\"language-plaintext highlighter-rouge\">core.labelSources</code>\nconfiguration file option.</p>\n\n<h3 id=\"corelabelwhitelist\">core.labelWhiteList</h3>\n\n<p><code class=\"language-plaintext highlighter-rouge\">core.labelWhiteList</code> specifies a regular expression for filtering feature\nlabels based on the label name. Non-matching labels are not published.</p>\n\n<p>Note: The regular expression is only matches against the “basename” part of the\nlabel, i.e. to the part of the name after ‘/’. The label prefix (or namespace)\nis omitted.</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">null</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">core</span><span class=\"pi\">:</span>\n <span class=\"na\">labelWhiteList</span><span class=\"pi\">:</span> <span class=\"s1\">'</span><span class=\"s\">^cpu-cpuid'</span>\n</code></pre> </div></div>\n\n<h3 id=\"corenopublish\">core.noPublish</h3>\n\n<p>Setting <code class=\"language-plaintext highlighter-rouge\">core.noPublish</code> to <code class=\"language-plaintext highlighter-rouge\">true</code> disables all communication with the\nnfd-master and the Kubernetes API server. It is effectively a “dry-run” option.\nNFD-Worker runs feature detection normally, but no labeling requests are sent\nto nfd-master and no <a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#nodefeature\">NodeFeature</a>\nobjects are created or updated in the API server.</p>\n\n<p>Note: Overridden by the\n<a href=\"/node-feature-discovery/v0.13/reference/worker-commandline-reference.html#-no-publish\"><code class=\"language-plaintext highlighter-rouge\">-no-publish</code></a> command line flag (if\nspecified).</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">false</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">core</span><span class=\"pi\">:</span>\n <span class=\"na\">noPublish</span><span class=\"pi\">:</span> <span class=\"no\">true</span>\n</code></pre> </div></div>\n\n<h3 id=\"coreklog\">core.klog</h3>\n\n<p>The following options specify the logger configuration. Most of which can be\ndynamically adjusted at run-time.</p>\n\n<p>Note: The logger options can also be specified via command line flags which\ntake precedence over any corresponding config file options.</p>\n\n<h4 id=\"coreklogadddirheader\">core.klog.addDirHeader</h4>\n\n<p>If true, adds the file directory to the header of the log messages.</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">false</code></p>\n\n<p>Run-time configurable: yes</p>\n\n<h4 id=\"coreklogalsologtostderr\">core.klog.alsologtostderr</h4>\n\n<p>Log to standard error as well as files.</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">false</code></p>\n\n<p>Run-time configurable: yes</p>\n\n<h4 id=\"corekloglogbacktraceat\">core.klog.logBacktraceAt</h4>\n\n<p>When logging hits line file:N, emit a stack trace.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Run-time configurable: yes</p>\n\n<h4 id=\"corekloglogdir\">core.klog.logDir</h4>\n\n<p>If non-empty, write log files in this directory.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Run-time configurable: no</p>\n\n<h4 id=\"corekloglogfile\">core.klog.logFile</h4>\n\n<p>If non-empty, use this log file.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Run-time configurable: no</p>\n\n<h4 id=\"corekloglogfilemaxsize\">core.klog.logFileMaxSize</h4>\n\n<p>Defines the maximum size a log file can grow to. Unit is megabytes. If the\nvalue is 0, the maximum file size is unlimited.</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">1800</code></p>\n\n<p>Run-time configurable: no</p>\n\n<h4 id=\"corekloglogtostderr\">core.klog.logtostderr</h4>\n\n<p>Log to standard error instead of files</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">true</code></p>\n\n<p>Run-time configurable: yes</p>\n\n<h4 id=\"coreklogskipheaders\">core.klog.skipHeaders</h4>\n\n<p>If true, avoid header prefixes in the log messages.</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">false</code></p>\n\n<p>Run-time configurable: yes</p>\n\n<h4 id=\"coreklogskiplogheaders\">core.klog.skipLogHeaders</h4>\n\n<p>If true, avoid headers when opening log files.</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">false</code></p>\n\n<p>Run-time configurable: no</p>\n\n<h4 id=\"coreklogstderrthreshold\">core.klog.stderrthreshold</h4>\n\n<p>Logs at or above this threshold go to stderr (default 2)</p>\n\n<p>Run-time configurable: yes</p>\n\n<h4 id=\"coreklogv\">core.klog.v</h4>\n\n<p>Number for the log level verbosity.</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">0</code></p>\n\n<p>Run-time configurable: yes</p>\n\n<h4 id=\"coreklogvmodule\">core.klog.vmodule</h4>\n\n<p>Comma-separated list of <code class=\"language-plaintext highlighter-rouge\">pattern=N</code> settings for file-filtered logging.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Run-time configurable: yes</p>\n\n<h2 id=\"sources\">sources</h2>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">sources</code> section contains feature source specific configuration parameters.</p>\n\n<h3 id=\"sourcescpu\">sources.cpu</h3>\n\n<h4 id=\"sourcescpucpuid\">sources.cpu.cpuid</h4>\n\n<h5 id=\"sourcescpucpuidattributeblacklist\">sources.cpu.cpuid.attributeBlacklist</h5>\n\n<p>Prevent publishing cpuid features listed in this option.</p>\n\n<p>Note: overridden by <code class=\"language-plaintext highlighter-rouge\">sources.cpu.cpuid.attributeWhitelist</code> (if specified)</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">[BMI1, BMI2, CLMUL, CMOV, CX16, ERMS, F16C, HTT, LZCNT, MMX, MMXEXT,\nNX, POPCNT, RDRAND, RDSEED, RDTSCP, SGX, SGXLC, SSE, SSE2, SSE3, SSE4.1,\nSSE4.2, SSSE3]</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">sources</span><span class=\"pi\">:</span>\n <span class=\"na\">cpu</span><span class=\"pi\">:</span>\n <span class=\"na\">cpuid</span><span class=\"pi\">:</span>\n <span class=\"na\">attributeBlacklist</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"nv\">MMX</span><span class=\"pi\">,</span> <span class=\"nv\">MMXEXT</span><span class=\"pi\">]</span>\n</code></pre> </div></div>\n\n<h5 id=\"sourcescpucpuidattributewhitelist\">sources.cpu.cpuid.attributeWhitelist</h5>\n\n<p>Only publish the cpuid features listed in this option.</p>\n\n<p>Note: takes precedence over <code class=\"language-plaintext highlighter-rouge\">sources.cpu.cpuid.attributeBlacklist</code></p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">sources</span><span class=\"pi\">:</span>\n <span class=\"na\">cpu</span><span class=\"pi\">:</span>\n <span class=\"na\">cpuid</span><span class=\"pi\">:</span>\n <span class=\"na\">attributeWhitelist</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"nv\">AVX512BW</span><span class=\"pi\">,</span> <span class=\"nv\">AVX512CD</span><span class=\"pi\">,</span> <span class=\"nv\">AVX512DQ</span><span class=\"pi\">,</span> <span class=\"nv\">AVX512F</span><span class=\"pi\">,</span> <span class=\"nv\">AVX512VL</span><span class=\"pi\">]</span>\n</code></pre> </div></div>\n\n<h3 id=\"sourceskernel\">sources.kernel</h3>\n\n<h4 id=\"sourceskernelkconfigfile\">sources.kernel.kconfigFile</h4>\n\n<p>Path of the kernel config file. If empty, NFD runs a search in the well-known\nstandard locations.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">sources</span><span class=\"pi\">:</span>\n <span class=\"na\">kernel</span><span class=\"pi\">:</span>\n <span class=\"na\">kconfigFile</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">/path/to/kconfig\"</span>\n</code></pre> </div></div>\n\n<h4 id=\"sourceskernelconfigopts\">sources.kernel.configOpts</h4>\n\n<p>Kernel configuration options to publish as feature labels.</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">[NO_HZ, NO_HZ_IDLE, NO_HZ_FULL, PREEMPT]</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">sources</span><span class=\"pi\">:</span>\n <span class=\"na\">kernel</span><span class=\"pi\">:</span>\n <span class=\"na\">configOpts</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"nv\">NO_HZ</span><span class=\"pi\">,</span> <span class=\"nv\">X86</span><span class=\"pi\">,</span> <span class=\"nv\">DMI</span><span class=\"pi\">]</span>\n</code></pre> </div></div>\n\n<h3 id=\"sourceslocal\">sources.local</h3>\n\n<h3 id=\"sourceslocalhooksenabled\">sources.local.hooksEnabled</h3>\n\n<p>Configuration option to disable/enable hooks execution. Enabled by default.\nHooks are DEPRECATED since v0.12.0 release and support will be removed in a\nfuture release. Use\n<a href=\"/node-feature-discovery/v0.13/usage/customization-guide.html#feature-files\">feature files</a> instead.</p>\n\n<p>Note: The default NFD container image only supports statically linked binaries.\nUse the <a href=\"/node-feature-discovery/v0.13/deployment/image-variants.html#full\">full</a> image variant for a\nslightly more extensive environment that additionally supports bash and perl\nruntimes.</p>\n\n<p>Related tracking issues:</p>\n\n<ol>\n <li>Config option to disable hooks <a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/issues/859\">#859</a>.</li>\n <li>Disable hook support by default <a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/issues/855\">#855</a>.</li>\n <li>Drop support for hooks <a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/issues/856\">#856</a>.</li>\n</ol>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">sources</span><span class=\"pi\">:</span>\n <span class=\"na\">local</span><span class=\"pi\">:</span>\n <span class=\"na\">hooksEnabled</span><span class=\"pi\">:</span> <span class=\"no\">true</span> <span class=\"c1\"># true by default</span>\n</code></pre> </div></div>\n\n<h3 id=\"sourcespci\">sources.pci</h3>\n\n<h4 id=\"sourcespcideviceclasswhitelist\">sources.pci.deviceClassWhitelist</h4>\n\n<p>List of PCI <a href=\"https://pci-ids.ucw.cz/read/PD\">device class</a> IDs for which to\npublish a label. Can be specified as a main class only (e.g. <code class=\"language-plaintext highlighter-rouge\">03</code>) or full\nclass-subclass combination (e.g. <code class=\"language-plaintext highlighter-rouge\">0300</code>) - the former implies that all\nsubclasses are accepted. The format of the labels can be further configured\nwith <a href=\"#sources.pci.deviceLabelFields\">deviceLabelFields</a>.</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">[\"03\", \"0b40\", \"12\"]</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">sources</span><span class=\"pi\">:</span>\n <span class=\"na\">pci</span><span class=\"pi\">:</span>\n <span class=\"na\">deviceClassWhitelist</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">0200\"</span><span class=\"pi\">,</span> <span class=\"s2\">\"</span><span class=\"s\">03\"</span><span class=\"pi\">]</span>\n</code></pre> </div></div>\n\n<h4 id=\"sourcespcidevicelabelfields\">sources.pci.deviceLabelFields</h4>\n\n<p>The set of PCI ID fields to use when constructing the name of the feature\nlabel. Valid fields are <code class=\"language-plaintext highlighter-rouge\">class</code>, <code class=\"language-plaintext highlighter-rouge\">vendor</code>, <code class=\"language-plaintext highlighter-rouge\">device</code>, <code class=\"language-plaintext highlighter-rouge\">subsystem_vendor</code> and\n<code class=\"language-plaintext highlighter-rouge\">subsystem_device</code>.</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">[class, vendor]</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">sources</span><span class=\"pi\">:</span>\n <span class=\"na\">pci</span><span class=\"pi\">:</span>\n <span class=\"na\">deviceLabelFields</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"nv\">class</span><span class=\"pi\">,</span> <span class=\"nv\">vendor</span><span class=\"pi\">,</span> <span class=\"nv\">device</span><span class=\"pi\">]</span>\n</code></pre> </div></div>\n\n<p>With the example config above NFD would publish labels like:\n<code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/pci-<class-id>_<vendor-id>_<device-id>.present=true</code></p>\n\n<h3 id=\"sourcesusb\">sources.usb</h3>\n\n<h4 id=\"sourcesusbdeviceclasswhitelist\">sources.usb.deviceClassWhitelist</h4>\n\n<p>List of USB <a href=\"https://www.usb.org/defined-class-codes\">device class</a> IDs for\nwhich to publish a feature label. The format of the labels can be further\nconfigured with <a href=\"#sources.usb.deviceLabelFields\">deviceLabelFields</a>.</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">[\"0e\", \"ef\", \"fe\", \"ff\"]</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">sources</span><span class=\"pi\">:</span>\n <span class=\"na\">usb</span><span class=\"pi\">:</span>\n <span class=\"na\">deviceClassWhitelist</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">ef\"</span><span class=\"pi\">,</span> <span class=\"s2\">\"</span><span class=\"s\">ff\"</span><span class=\"pi\">]</span>\n</code></pre> </div></div>\n\n<h4 id=\"sourcesusbdevicelabelfields\">sources.usb.deviceLabelFields</h4>\n\n<p>The set of USB ID fields from which to compose the name of the feature label.\nValid fields are <code class=\"language-plaintext highlighter-rouge\">class</code>, <code class=\"language-plaintext highlighter-rouge\">vendor</code>, <code class=\"language-plaintext highlighter-rouge\">device</code> and <code class=\"language-plaintext highlighter-rouge\">serial</code>.</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">[class, vendor, device]</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">sources</span><span class=\"pi\">:</span>\n <span class=\"na\">pci</span><span class=\"pi\">:</span>\n <span class=\"na\">deviceLabelFields</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"nv\">class</span><span class=\"pi\">,</span> <span class=\"nv\">vendor</span><span class=\"pi\">]</span>\n</code></pre> </div></div>\n\n<p>With the example config above NFD would publish labels like:\n<code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/usb-<class-id>_<vendor-id>.present=true</code></p>\n\n<h3 id=\"sourcescustom\">sources.custom</h3>\n\n<p>List of rules to process in the custom feature source to create user-specific\nlabels. Refer to the documentation of the\n<a href=\"/node-feature-discovery/v0.13/usage/customization-guide.html#custom-feature-source\">custom feature source</a> for\ndetails of the available rules and their configuration.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">sources</span><span class=\"pi\">:</span>\n <span class=\"na\">custom</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">my</span><span class=\"nv\"> </span><span class=\"s\">custom</span><span class=\"nv\"> </span><span class=\"s\">rule\"</span>\n <span class=\"na\">labels</span><span class=\"pi\">:</span>\n <span class=\"na\">my-custom-feature</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">true\"</span>\n <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">kernel.loadedmodule</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">e1000e</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">Exists</span><span class=\"pi\">}</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">pci.device</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">class</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">In</span><span class=\"pi\">,</span> <span class=\"nv\">value</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">0200\"</span><span class=\"pi\">]}</span>\n <span class=\"na\">vendor</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">In</span><span class=\"pi\">,</span> <span class=\"nv\">value</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">8086\"</span><span class=\"pi\">]}</span>\n</code></pre> </div></div>\n","dir":"/reference/","name":"worker-configuration-reference.md","path":"reference/worker-configuration-reference.md","url":"/reference/worker-configuration-reference.html"},{"title":"NFD-Worker","layout":"default","sort":4,"content":"<h1 class=\"no_toc\" id=\"nfd-worker\">NFD-Worker</h1>\n\n<h2 class=\"no_toc text-delta\" id=\"table-of-contents\">Table of contents</h2>\n\n<ol id=\"markdown-toc\">\n <li><a href=\"#worker-configuration\" id=\"markdown-toc-worker-configuration\">Worker configuration</a></li>\n</ol>\n\n<hr />\n\n<p>NFD-Worker is preferably run as a Kubernetes DaemonSet. This assures\nre-labeling on regular intervals capturing changes in the system configuration\nand makes sure that new nodes are labeled as they are added to the cluster.\nWorker connects to the nfd-master service to advertise hardware features.</p>\n\n<p>When run as a daemonset, nodes are re-labeled at an default interval of 60s.\nThis can be changed by using the\n<a href=\"/node-feature-discovery/v0.13/reference/worker-configuration-reference.html#coresleepinterval\"><code class=\"language-plaintext highlighter-rouge\">core.sleepInterval</code></a>\nconfig option.</p>\n\n<p>The worker configuration file is watched and re-read on every change which\nprovides a simple mechanism of dynamic run-time reconfiguration. See\n<a href=\"#worker-configuration\">worker configuration</a> for more details.</p>\n\n<h2 id=\"worker-configuration\">Worker configuration</h2>\n\n<p>NFD-Worker supports dynamic configuration through a configuration file. The\ndefault location is <code class=\"language-plaintext highlighter-rouge\">/etc/kubernetes/node-feature-discovery/nfd-worker.conf</code>,\nbut, this can be changed by specifying the<code class=\"language-plaintext highlighter-rouge\">-config</code> command line flag.\nConfiguration file is re-read whenever it is modified which makes run-time\nre-configuration of nfd-worker straightforward.</p>\n\n<p>Worker configuration file is read inside the container, and thus, Volumes and\nVolumeMounts are needed to make your configuration available for NFD. The\npreferred method is to use a ConfigMap which provides easy deployment and\nre-configurability.</p>\n\n<p>The provided nfd-worker deployment templates create an empty configmap and\nmount it inside the nfd-worker containers. In kustomize deployments,\nconfiguration can be edited with:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>kubectl <span class=\"nt\">-n</span> <span class=\"k\">${</span><span class=\"nv\">NFD_NS</span><span class=\"k\">}</span> edit configmap nfd-worker-conf\n</code></pre> </div></div>\n\n<p>In Helm deployments,\n<a href=\"/node-feature-discovery/v0.13/deployment/helm.html#worker-pod-parameters\">Worker pod parameter</a>\n<code class=\"language-plaintext highlighter-rouge\">worker.config</code> can be used to edit the respective configuration.</p>\n\n<p>See\n<a href=\"../reference/worker-configuration-reference\">nfd-worker configuration file reference</a>\nfor more details.\nThe (empty-by-default)\n<a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.13.6/deployment/components/worker-config/nfd-worker.conf.example\">example config</a>\ncontains all available configuration options and can be used as a reference\nfor creating a configuration.</p>\n\n<p>Configuration options can also be specified via the <code class=\"language-plaintext highlighter-rouge\">-options</code> command line\nflag, in which case no mounts need to be used. The same format as in the config\nfile must be used, i.e. JSON (or YAML). For example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nt\">-options</span><span class=\"o\">=</span><span class=\"s1\">'{\"sources\": { \"pci\": { \"deviceClassWhitelist\": [\"12\"] } } }'</span>\n</code></pre> </div></div>\n\n<p>Configuration options specified from the command line will override those read\nfrom the config file.</p>\n","dir":"/usage/","name":"nfd-worker.md","path":"usage/nfd-worker.md","url":"/usage/nfd-worker.html"},{"title":"NFD Operator","layout":"default","sort":4,"content":"<h1 class=\"no_toc\" id=\"deployment-with-nfd-operator\">Deployment with NFD Operator</h1>\n\n<h2 class=\"no_toc text-delta\" id=\"table-of-contents\">Table of contents</h2>\n\n<ol id=\"markdown-toc\">\n <li><a href=\"#deployment\" id=\"markdown-toc-deployment\">Deployment</a></li>\n <li><a href=\"#uninstallation\" id=\"markdown-toc-uninstallation\">Uninstallation</a></li>\n</ol>\n\n<hr />\n\n<p>The <a href=\"https://github.com/kubernetes-sigs/node-feature-discovery-operator\">Node Feature Discovery Operator</a> automates installation,\nconfiguration and updates of NFD using a specific NodeFeatureDiscovery custom\nresource. This also provides good support for managing NFD as a dependency of\nother operators.</p>\n\n<h2 id=\"deployment\">Deployment</h2>\n\n<p>Deployment using the\n<a href=\"https://github.com/kubernetes-sigs/node-feature-discovery-operator\">Node Feature Discovery Operator</a>\nis recommended to be done via\n<a href=\"https://operatorhub.io/operator/nfd-operator\">operatorhub.io</a>.</p>\n\n<ol>\n <li>You need to have\n<a href=\"https://github.com/operator-framework/operator-lifecycle-manager\">OLM</a>\ninstalled. If you don’t, take a look at the\n<a href=\"https://github.com/operator-framework/operator-lifecycle-manager/releases/latest\">latest release</a>\nfor detailed instructions.</li>\n <li>\n <p>Install the operator:</p>\n\n <div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>kubectl create <span class=\"nt\">-f</span> https://operatorhub.io/install/nfd-operator.yaml\n</code></pre> </div> </div>\n </li>\n <li>\n <p>Create <code class=\"language-plaintext highlighter-rouge\">NodeFeatureDiscovery</code> object (in <code class=\"language-plaintext highlighter-rouge\">nfd</code> namespace here):</p>\n\n <div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nb\">cat</span> <span class=\"o\"><<</span> <span class=\"no\">EOF</span><span class=\"sh\"> | kubectl apply -f -\napiVersion: v1\nkind: Namespace\nmetadata:\n name: nfd\n---\napiVersion: nfd.kubernetes.io/v1\nkind: NodeFeatureDiscovery\nmetadata:\n name: my-nfd-deployment\n namespace: nfd\nspec:\n operand:\n image: registry.k8s.io/nfd/node-feature-discovery:v0.13.6\n imagePullPolicy: IfNotPresent\n</span><span class=\"no\">EOF\n</span></code></pre> </div> </div>\n </li>\n</ol>\n\n<p>In order to deploy the <a href=\"/node-feature-discovery/v0.13/deployment/image-variants.html#minimal\">minimal</a> image you need to use</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> <span class=\"na\">image</span><span class=\"pi\">:</span> <span class=\"s\">registry.k8s.io/nfd/node-feature-discovery:v0.13.6-minimal</span>\n</code></pre> </div></div>\n\n<p>in the <code class=\"language-plaintext highlighter-rouge\">NodeFeatureDiscovery</code> object above.</p>\n\n<h2 id=\"uninstallation\">Uninstallation</h2>\n\n<p>If you followed the deployment instructions above you can simply do:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>kubectl <span class=\"nt\">-n</span> nfd delete NodeFeatureDiscovery my-nfd-deployment\n</code></pre> </div></div>\n\n<p>Optionally, you can also remove the namespace:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>kubectl delete ns nfd\n</code></pre> </div></div>\n\n<p>See the <a href=\"https://github.com/kubernetes-sigs/node-feature-discovery-operator\">node-feature-discovery-operator</a> and <a href=\"https://github.com/operator-framework/operator-lifecycle-manager\">OLM</a> project\ndocumentation for instructions for uninstalling the operator and operator\nlifecycle manager, respectively.</p>\n\n<!-- Links -->\n","dir":"/deployment/","name":"operator.md","path":"deployment/operator.md","url":"/deployment/operator.html"},{"title":"Topology Updater Cmdline Reference","layout":"default","sort":5,"content":"<h1 id=\"nfd-topology-updater-commandline-flags\">NFD-Topology-Updater Commandline Flags</h1>\n\n<h2 class=\"no_toc\" id=\"table-of-contents\">Table of Contents</h2>\n\n<ol class=\"no_toc text-delta\" id=\"markdown-toc\">\n <li><a href=\"#nfd-topology-updater-commandline-flags\" id=\"markdown-toc-nfd-topology-updater-commandline-flags\">NFD-Topology-Updater Commandline Flags</a> <ol>\n <li><a href=\"#-h--help\" id=\"markdown-toc--h--help\">-h, -help</a></li>\n <li><a href=\"#-version\" id=\"markdown-toc--version\">-version</a></li>\n <li><a href=\"#-config\" id=\"markdown-toc--config\">-config</a></li>\n <li><a href=\"#-no-publish\" id=\"markdown-toc--no-publish\">-no-publish</a></li>\n <li><a href=\"#-oneshot\" id=\"markdown-toc--oneshot\">-oneshot</a></li>\n <li><a href=\"#-sleep-interval\" id=\"markdown-toc--sleep-interval\">-sleep-interval</a></li>\n <li><a href=\"#-watch-namespace\" id=\"markdown-toc--watch-namespace\">-watch-namespace</a></li>\n <li><a href=\"#-kubelet-config-uri\" id=\"markdown-toc--kubelet-config-uri\">-kubelet-config-uri</a></li>\n <li><a href=\"#-api-auth-token-file\" id=\"markdown-toc--api-auth-token-file\">-api-auth-token-file</a></li>\n <li><a href=\"#-podresources-socket\" id=\"markdown-toc--podresources-socket\">-podresources-socket</a></li>\n <li><a href=\"#-pods-fingerprint\" id=\"markdown-toc--pods-fingerprint\">-pods-fingerprint</a></li>\n <li><a href=\"#-kubelet-state-dir\" id=\"markdown-toc--kubelet-state-dir\">-kubelet-state-dir</a></li>\n </ol>\n </li>\n</ol>\n\n<hr />\n\n<p>To quickly view available command line flags execute <code class=\"language-plaintext highlighter-rouge\">nfd-topology-updater -help</code>.\nIn a docker container:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>docker run registry.k8s.io/nfd/node-feature-discovery:v0.13.6 <span class=\"se\">\\</span>\nnfd-topology-updater <span class=\"nt\">-help</span>\n</code></pre> </div></div>\n\n<h3 id=\"-h--help\">-h, -help</h3>\n\n<p>Print usage and exit.</p>\n\n<h3 id=\"-version\">-version</h3>\n\n<p>Print version and exit.</p>\n\n<h3 id=\"-config\">-config</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-config</code> flag specifies the path of the nfd-topology-updater\nconfiguration file to use.</p>\n\n<p>Default: /etc/kubernetes/node-feature-discovery/nfd-topology-updater.conf</p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-topology-updater <span class=\"nt\">-config</span><span class=\"o\">=</span>/opt/nfd/nfd-topology-updater.conf\n</code></pre> </div></div>\n\n<h3 id=\"-no-publish\">-no-publish</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-no-publish</code> flag disables all communication with the nfd-master, making\nit a “dry-run” flag for nfd-topology-updater. NFD-Topology-Updater runs\nresource hardware topology detection normally, but no CR requests are sent to\nnfd-master.</p>\n\n<p>Default: <em>false</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-topology-updater <span class=\"nt\">-no-publish</span>\n</code></pre> </div></div>\n\n<h3 id=\"-oneshot\">-oneshot</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-oneshot</code> flag causes nfd-topology-updater to exit after one pass of\nresource hardware topology detection.</p>\n\n<p>Default: <em>false</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-topology-updater <span class=\"nt\">-oneshot</span> <span class=\"nt\">-no-publish</span>\n</code></pre> </div></div>\n\n<h3 id=\"-sleep-interval\">-sleep-interval</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-sleep-interval</code> specifies the interval between resource hardware\ntopology re-examination (and CR updates). zero means no CR updates on interval basis.</p>\n\n<p>Default: 60s</p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-topology-updater <span class=\"nt\">-sleep-interval</span><span class=\"o\">=</span>1h\n</code></pre> </div></div>\n\n<h3 id=\"-watch-namespace\">-watch-namespace</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-watch-namespace</code> specifies the namespace to ensure that resource\nhardware topology examination only happens for the pods running in the\nspecified namespace. Pods that are not running in the specified namespace\nare not considered during resource accounting. This is particularly useful\nfor testing/debugging purpose. A “*” value would mean that all the pods would\nbe considered during the accounting process.</p>\n\n<p>Default: “*”</p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-topology-updater <span class=\"nt\">-watch-namespace</span><span class=\"o\">=</span>rte\n</code></pre> </div></div>\n\n<h3 id=\"-kubelet-config-uri\">-kubelet-config-uri</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-kubelet-config-uri</code> specifies the path to the Kubelet’s configuration.\nNote that the URi could either be a local host file or an HTTP endpoint.</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">https://${NODE_NAME}:10250/configz</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-topology-updater <span class=\"nt\">-kubelet-config-uri</span><span class=\"o\">=</span>file:///var/lib/kubelet/config.yaml\n</code></pre> </div></div>\n\n<h3 id=\"-api-auth-token-file\">-api-auth-token-file</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-api-auth-token-file</code> specifies the path to the api auth token file\nwhich is used to retrieve Kubelet’s configuration from Kubelet secure port,\nonly taking effect when <code class=\"language-plaintext highlighter-rouge\">-kubelet-config-uri</code> is https.\nNote that this token file must bind to a role that has the <code class=\"language-plaintext highlighter-rouge\">get</code> capability to\n<code class=\"language-plaintext highlighter-rouge\">nodes/proxy</code> resources.</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">/var/run/secrets/kubernetes.io/serviceaccount/token</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-topology-updater <span class=\"nt\">-token-file</span><span class=\"o\">=</span>/var/run/secrets/kubernetes.io/serviceaccount/token\n</code></pre> </div></div>\n\n<h3 id=\"-podresources-socket\">-podresources-socket</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-podresources-socket</code> specifies the path to the Unix socket where kubelet\nexports a gRPC service to enable discovery of in-use CPUs and devices, and to\nprovide metadata for them.</p>\n\n<p>Default: /host-var/lib/kubelet/pod-resources/kubelet.sock</p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-topology-updater <span class=\"nt\">-podresources-socket</span><span class=\"o\">=</span>/var/lib/kubelet/pod-resources/kubelet.sock\n</code></pre> </div></div>\n\n<h3 id=\"-pods-fingerprint\">-pods-fingerprint</h3>\n\n<p>Enables compute and report the pod set fingerprint in the NRT.\nA pod fingerprint is a compact representation of the “node state” regarding resources.</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">false</code></p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-topology-updater <span class=\"nt\">-pods-fingerprint</span>\n</code></pre> </div></div>\n\n<h3 id=\"-kubelet-state-dir\">-kubelet-state-dir</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-kubelet-state-dir</code> specifies the path to the Kubelet state directory,\nwhere state and checkpoint files are stored.\nThe files are mount as read-only and cannot be change by the updater.\nEnabled by default.\nPassing an empty string will disable the watching.</p>\n\n<p>Default: /host-var/lib/kubelet</p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-topology-updater <span class=\"nt\">-kubelet-state-dir</span><span class=\"o\">=</span>/var/lib/kubelet\n</code></pre> </div></div>\n","dir":"/reference/","name":"topology-updater-commandline-reference.md","path":"reference/topology-updater-commandline-reference.md","url":"/reference/topology-updater-commandline-reference.html"},{"title":"TLS authentication","layout":"default","sort":5,"content":"<h1 class=\"no_toc\" id=\"communication-security-with-tls\">Communication security with TLS</h1>\n\n<h2 class=\"no_toc text-delta\" id=\"table-of-contents\">Table of contents</h2>\n\n<ol id=\"markdown-toc\">\n <li><a href=\"#automated-tls-certificate-management-using-cert-manager\" id=\"markdown-toc-automated-tls-certificate-management-using-cert-manager\">Automated TLS certificate management using cert-manager</a></li>\n <li><a href=\"#manual-tls-certificate-management\" id=\"markdown-toc-manual-tls-certificate-management\">Manual TLS certificate management</a></li>\n</ol>\n\n<hr />\n\n<p>NFD supports mutual TLS authentication between the nfd-master and nfd-worker\ninstances. That is, nfd-worker and nfd-master both verify that the other end\npresents a valid certificate.</p>\n\n<p>TLS authentication is enabled by specifying <code class=\"language-plaintext highlighter-rouge\">-ca-file</code>, <code class=\"language-plaintext highlighter-rouge\">-key-file</code> and\n<code class=\"language-plaintext highlighter-rouge\">-cert-file</code> args, on both the nfd-master and nfd-worker instances. The\ntemplate specs provided with NFD contain (commented out) example configuration\nfor enabling TLS authentication.</p>\n\n<p>The Common Name (CN) of the nfd-master certificate must match the DNS name of\nthe nfd-master Service of the cluster. By default, nfd-master only check that\nthe nfd-worker has been signed by the specified root certificate (-ca-file).</p>\n\n<p>Additional hardening can be enabled by specifying <code class=\"language-plaintext highlighter-rouge\">-verify-node-name</code> in\nnfd-master args, in which case nfd-master verifies that the NodeName presented\nby nfd-worker matches the Common Name (CN) or a Subject Alternative Name (SAN)\nof its certificate. Note that <code class=\"language-plaintext highlighter-rouge\">-verify-node-name</code> complicates certificate\nmanagement and is not yet supported in the helm or kustomize deployment\nmethods.</p>\n\n<h2 id=\"automated-tls-certificate-management-using-cert-manager\">Automated TLS certificate management using cert-manager</h2>\n\n<p><a href=\"https://cert-manager.io/\">cert-manager</a> can be used to automate certificate\nmanagement between nfd-master and the nfd-worker pods.</p>\n\n<p>The NFD source code repository contains an example kustomize overlay and helm\nchart that can be used to deploy NFD with cert-manager supplied certificates\nenabled.</p>\n\n<p>To install <code class=\"language-plaintext highlighter-rouge\">cert-manager</code> itself can be done as easily as this, below, or you\ncan refer to their documentation for other installation methods such as the\nhelm chart they provide.</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>kubectl apply <span class=\"nt\">-f</span> https://github.com/jetstack/cert-manager/releases/download/v1.6.1/cert-manager.yaml\n</code></pre> </div></div>\n\n<p>To use the kustomize overlay to install node-feature-discovery with TLS enabled,\nyou may use the following:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>kubectl apply <span class=\"nt\">-k</span> deployment/overlays/samples/cert-manager\n</code></pre> </div></div>\n\n<p>To make use of the helm chart, override <code class=\"language-plaintext highlighter-rouge\">values.yaml</code> to enable both the\n<code class=\"language-plaintext highlighter-rouge\">tls.enabled</code> and <code class=\"language-plaintext highlighter-rouge\">tls.certManager</code> options. Note that if you do not enable\n<code class=\"language-plaintext highlighter-rouge\">tls.certManager</code>, helm will successfully install the application, but\ndeployment will wait until certificates are manually created, as demonstrated\nbelow.</p>\n\n<p>See the sample installation commands in the Helm <a href=\"/node-feature-discovery/v0.13/deployment/helm.html#deployment\">Deployment</a>\nand <a href=\"/node-feature-discovery/v0.13/deployment/helm.html#configuration\">Configuration</a> sections above for how to either override\nindividual values, or provide a yaml file with which to override default\nvalues.</p>\n\n<h2 id=\"manual-tls-certificate-management\">Manual TLS certificate management</h2>\n\n<p>If you do not with to make use of cert-manager, the certificates can be\nmanually created and stored as secrets within the NFD namespace.</p>\n\n<p>Create a CA certificate</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>openssl req <span class=\"nt\">-x509</span> <span class=\"nt\">-newkey</span> rsa:4096 <span class=\"nt\">-keyout</span> ca.key <span class=\"nt\">-nodes</span> <span class=\"se\">\\</span>\n <span class=\"nt\">-subj</span> <span class=\"s2\">\"/CN=nfd-ca\"</span> <span class=\"nt\">-days</span> 10000 <span class=\"nt\">-out</span> ca.crt\n</code></pre> </div></div>\n\n<p>Create a common openssl config file.</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nb\">cat</span> <span class=\"o\"><<</span><span class=\"no\">EOF</span><span class=\"sh\"> > nfd-common.conf\n[ req ]\ndefault_bits = 4096\nprompt = no\ndefault_md = sha256\nreq_extensions = req_ext\ndistinguished_name = dn\n\n[ dn ]\nC = XX\nST = some-state\nL = some-city\nO = some-company\nOU = node-feature-discovery\n\n[ req_ext ]\nsubjectAltName = @alt_names\n\n[ v3_ext ]\nauthorityKeyIdentifier=keyid,issuer:always\nbasicConstraints=CA:FALSE\nkeyUsage=keyEncipherment,dataEncipherment\nextendedKeyUsage=serverAuth,clientAuth\nsubjectAltName=@alt_names\n</span><span class=\"no\">EOF\n</span></code></pre> </div></div>\n\n<p>Now, create the nfd-master certificate.</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nb\">cat</span> <span class=\"o\"><<</span><span class=\"no\">EOF</span><span class=\"sh\"> > nfd-master.conf\n.include nfd-common.conf\n\n[ dn ]\nCN = nfd-master\n\n[ alt_names ]\nDNS.1 = nfd-master\nDNS.2 = nfd-master.node-feature-discovery.svc.cluster.local\nDNS.3 = localhost\n</span><span class=\"no\">EOF\n\n</span>openssl req <span class=\"nt\">-new</span> <span class=\"nt\">-newkey</span> rsa:4096 <span class=\"nt\">-keyout</span> nfd-master.key <span class=\"nt\">-nodes</span> <span class=\"nt\">-out</span> nfd-master.csr <span class=\"nt\">-config</span> nfd-master.conf\n</code></pre> </div></div>\n\n<p>Create certificates for nfd-worker and nfd-topology-updater</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nb\">cat</span> <span class=\"o\"><<</span><span class=\"no\">EOF</span><span class=\"sh\"> > nfd-worker.conf\n.include nfd-common.conf\n\n[ dn ]\nCN = nfd-worker\n\n[ alt_names ]\nDNS.1 = nfd-worker\nDNS.2 = nfd-worker.node-feature-discovery.svc.cluster.local\n</span><span class=\"no\">EOF\n\n</span><span class=\"c\"># Config for topology updater is identical except for the DN and alt_names</span>\n<span class=\"nb\">sed</span> <span class=\"nt\">-e</span> <span class=\"s1\">'s/worker/topology-updater/g'</span> < nfd-worker.conf <span class=\"o\">></span> nfd-topology-updater.conf\n\nopenssl req <span class=\"nt\">-new</span> <span class=\"nt\">-newkey</span> rsa:4096 <span class=\"nt\">-keyout</span> nfd-worker.key <span class=\"nt\">-nodes</span> <span class=\"nt\">-out</span> nfd-worker.csr <span class=\"nt\">-config</span> nfd-worker.conf\nopenssl req <span class=\"nt\">-new</span> <span class=\"nt\">-newkey</span> rsa:4096 <span class=\"nt\">-keyout</span> nfd-topology-updater.key <span class=\"nt\">-nodes</span> <span class=\"nt\">-out</span> nfd-topology-updater.csr <span class=\"nt\">-config</span> nfd-topology-updater.conf\n</code></pre> </div></div>\n\n<p>Now, sign the certificates with the CA created earlier.</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"k\">for </span>cert <span class=\"k\">in </span>nfd-master nfd-worker nfd-topology-updater<span class=\"p\">;</span> <span class=\"k\">do\n </span><span class=\"nb\">echo </span>signing <span class=\"nv\">$cert</span>\n openssl x509 <span class=\"nt\">-req</span> <span class=\"nt\">-in</span> <span class=\"nv\">$cert</span>.csr <span class=\"nt\">-CA</span> ca.crt <span class=\"nt\">-CAkey</span> ca.key <span class=\"se\">\\</span>\n <span class=\"nt\">-CAcreateserial</span> <span class=\"nt\">-out</span> <span class=\"nv\">$cert</span>.crt <span class=\"nt\">-days</span> 10000 <span class=\"se\">\\</span>\n <span class=\"nt\">-extensions</span> v3_ext <span class=\"nt\">-extfile</span> <span class=\"nv\">$cert</span>.conf\n<span class=\"k\">done</span>\n</code></pre> </div></div>\n\n<p>Finally, turn these certificates into secrets.</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"k\">for </span>cert <span class=\"k\">in </span>nfd-master nfd-worker nfd-topology-updater<span class=\"p\">;</span> <span class=\"k\">do\n </span><span class=\"nb\">echo </span>creating secret <span class=\"k\">for</span> <span class=\"nv\">$cert</span> <span class=\"k\">in </span>node-feature-discovery namespace\n <span class=\"nb\">cat</span> <span class=\"o\"><<</span><span class=\"no\">EOF</span><span class=\"sh\"> | kubectl create -n node-feature-discovery -f -\n---\napiVersion: v1\nkind: Secret\ntype: kubernetes.io/tls\nmetadata:\n name: </span><span class=\"k\">${</span><span class=\"nv\">cert</span><span class=\"k\">}</span><span class=\"sh\">-cert\ndata:\n ca.crt: </span><span class=\"si\">$(</span> <span class=\"nb\">cat </span>ca.crt | <span class=\"nb\">base64</span> <span class=\"nt\">-w</span> 0 <span class=\"si\">)</span><span class=\"sh\">\n tls.crt: </span><span class=\"si\">$(</span> <span class=\"nb\">cat</span> <span class=\"nv\">$cert</span>.crt | <span class=\"nb\">base64</span> <span class=\"nt\">-w</span> 0 <span class=\"si\">)</span><span class=\"sh\">\n tls.key: </span><span class=\"si\">$(</span> <span class=\"nb\">cat</span> <span class=\"nv\">$cert</span>.key | <span class=\"nb\">base64</span> <span class=\"nt\">-w</span> 0 <span class=\"si\">)</span><span class=\"sh\">\n</span><span class=\"no\">EOF\n\n</span><span class=\"k\">done</span>\n</code></pre> </div></div>\n","dir":"/deployment/","name":"tls.md","path":"deployment/tls.md","url":"/deployment/tls.html"},{"title":"NFD-Topology-Updater","layout":"default","sort":5,"content":"<h1 class=\"no_toc\" id=\"nfd-topology-updater\">NFD-Topology-Updater</h1>\n\n<hr />\n\n<p>NFD-Topology-Updater is preferably run as a Kubernetes DaemonSet.\nThis assures re-examination on regular intervals\nand/or per pod life-cycle events, capturing changes in the allocated\nresources and hence the allocatable resources on a per-zone basis by updating\n<a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#noderesourcetopology\">NodeResourceTopology</a> custom resources.\nIt makes sure that new NodeResourceTopology instances are created for each new\nnodes that get added to the cluster.</p>\n\n<p>When run as a daemonset, nodes are re-examined for the allocated resources\n(to determine the information of the allocatable resources on a per-zone basis\nwhere a zone can be a NUMA node) at an interval specified using the\n<a href=\"../reference/topology-updater-commandline-reference.html.md#-sleep-interval\"><code class=\"language-plaintext highlighter-rouge\">-sleep-interval</code></a>\noption. The default sleep interval is set to 60s\nwhich is the value when no -sleep-interval is specified.\nThe re-examination can be disabled by setting the sleep-interval to 0.</p>\n\n<p>Another option is to configure the updater to update\nthe allocated resources per pod life-cycle events.\nThe updater will monitor the checkpoint file stated in\n<a href=\"/node-feature-discovery/v0.13/reference/topology-updater-commandline-reference.html#-kubelet-state-dir\"><code class=\"language-plaintext highlighter-rouge\">-kubelet-state-dir</code></a>\nand triggers an update for every change occurs in the files.</p>\n\n<p>In addition, it can avoid examining specific allocated resources\ngiven a configuration of resources to exclude via <a href=\"/node-feature-discovery/v0.13/reference/topology-updater-configuration-reference.html#excludelist\"><code class=\"language-plaintext highlighter-rouge\">-excludeList</code></a></p>\n\n<h2 id=\"deployment-notes\">Deployment Notes</h2>\n\n<p>Kubelet <a href=\"https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#monitoring-device-plugin-resources\">PodResource API</a> is a prerequisite for\nnfd-topology-updater to be able to run.</p>\n\n<p>Preceding Kubernetes v1.23, the <code class=\"language-plaintext highlighter-rouge\">kubelet</code> must be started with\n<code class=\"language-plaintext highlighter-rouge\">--feature-gates=KubeletPodResourcesGetAllocatable=true</code>.</p>\n\n<p>Starting from Kubernetes v1.23, the <code class=\"language-plaintext highlighter-rouge\">KubeletPodResourcesGetAllocatable</code>\n<a href=\"https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates\">feature gate</a>. is enabled by default</p>\n\n<h2 id=\"topology-updater-configuration\">Topology-Updater Configuration</h2>\n\n<p>NFD-Topology-Updater supports configuration through a configuration file. The\ndefault location is <code class=\"language-plaintext highlighter-rouge\">/etc/kubernetes/node-feature-discovery/topology-updater.conf</code>,\nbut, this can be changed by specifying the<code class=\"language-plaintext highlighter-rouge\">-config</code> command line flag.</p>\n<blockquote>\n <p>NOTE: unlike nfd-worker,\ndynamic configuration updates are not currently supported.</p>\n</blockquote>\n\n<p>Topology-Updater configuration file is read inside the container,\nand thus, Volumes and VolumeMounts are needed\nto make your configuration available for NFD.\nThe preferred method is to use a ConfigMap\nwhich provides easy deployment and re-configurability.</p>\n\n<p>The provided nfd-topology-updater deployment templates\ncreate an empty configmap\nand mount it inside the nfd-topology-updater containers.\nIn kustomize deployments, configuration can be edited with:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>kubectl <span class=\"nt\">-n</span> <span class=\"k\">${</span><span class=\"nv\">NFD_NS</span><span class=\"k\">}</span> edit configmap nfd-topology-updater-conf\n</code></pre> </div></div>\n\n<p>In Helm deployments,\n<a href=\"/node-feature-discovery/v0.13/deployment/helm.html#topology-updater-parameters\">Topology Updater parameters</a>\n<code class=\"language-plaintext highlighter-rouge\">toplogyUpdater.config</code> can be used to edit the respective configuration.</p>\n\n<p>See\n<a href=\"/node-feature-discovery/v0.13/reference/topology-updater-configuration-reference.html\">nfd-topology-updater configuration file reference</a>\nfor more details.\nThe (empty-by-default)\n<a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.13.6/deployment/components/topology-updater-config/nfd-topology-updater.conf.example\">example config</a>\ncontains all available configuration options and can be used as a reference\nfor creating a configuration.</p>\n\n<!-- Links -->\n","dir":"/usage/","name":"nfd-topology-updater.md","path":"usage/nfd-topology-updater.md","url":"/usage/nfd-topology-updater.html"},{"title":"Developer guide","layout":"default","sort":5,"content":"<h1 class=\"no_toc\" id=\"developer-guide\">Developer guide</h1>\n\n<h2 class=\"no_toc text-delta\" id=\"table-of-contents\">Table of contents</h2>\n\n<ol id=\"markdown-toc\">\n <li><a href=\"#building-from-source\" id=\"markdown-toc-building-from-source\">Building from source</a> <ol>\n <li><a href=\"#download-the-source-code\" id=\"markdown-toc-download-the-source-code\">Download the source code</a></li>\n <li><a href=\"#docker-build\" id=\"markdown-toc-docker-build\">Docker build</a></li>\n <li><a href=\"#docker-multi-arch-builds-with-buildx\" id=\"markdown-toc-docker-multi-arch-builds-with-buildx\">Docker multi-arch builds with buildx</a></li>\n <li><a href=\"#deployment\" id=\"markdown-toc-deployment\">Deployment</a></li>\n <li><a href=\"#building-locally\" id=\"markdown-toc-building-locally\">Building locally</a></li>\n <li><a href=\"#customizing-the-build\" id=\"markdown-toc-customizing-the-build\">Customizing the build</a></li>\n <li><a href=\"#testing\" id=\"markdown-toc-testing\">Testing</a></li>\n </ol>\n </li>\n <li><a href=\"#running-locally\" id=\"markdown-toc-running-locally\">Running locally</a> <ol>\n <li><a href=\"#nfd-master\" id=\"markdown-toc-nfd-master\">NFD-Master</a></li>\n <li><a href=\"#nfd-worker\" id=\"markdown-toc-nfd-worker\">NFD-Worker</a></li>\n <li><a href=\"#nfd-topology-updater\" id=\"markdown-toc-nfd-topology-updater\">NFD-Topology-Updater</a></li>\n </ol>\n </li>\n <li><a href=\"#running-with-tilt\" id=\"markdown-toc-running-with-tilt\">Running with Tilt</a> <ol>\n <li><a href=\"#prerequisites\" id=\"markdown-toc-prerequisites\">Prerequisites</a></li>\n <li><a href=\"#environment-variables\" id=\"markdown-toc-environment-variables\">Environment variables</a></li>\n </ol>\n </li>\n <li><a href=\"#documentation\" id=\"markdown-toc-documentation\">Documentation</a></li>\n</ol>\n\n<hr />\n\n<h2 id=\"building-from-source\">Building from source</h2>\n\n<h3 id=\"download-the-source-code\">Download the source code</h3>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>git clone https://github.com/kubernetes-sigs/node-feature-discovery\n<span class=\"nb\">cd </span>node-feature-discovery\n</code></pre> </div></div>\n\n<h3 id=\"docker-build\">Docker build</h3>\n\n<h4 id=\"build-the-container-image\">Build the container image</h4>\n\n<p>See <a href=\"#customizing-the-build\">customizing the build</a> below for altering the\ncontainer image registry, for example.</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>make\n</code></pre> </div></div>\n\n<h4 id=\"push-the-container-image\">Push the container image</h4>\n\n<p>Optional, this example with Docker.</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>docker push <IMAGE_TAG>\n</code></pre> </div></div>\n\n<h3 id=\"docker-multi-arch-builds-with-buildx\">Docker multi-arch builds with buildx</h3>\n\n<p>The default set of architectures enabled for mulit-arch builds are <code class=\"language-plaintext highlighter-rouge\">linux/amd64</code>\nand <code class=\"language-plaintext highlighter-rouge\">linux/arm64</code>. If more architectures are needed one can override the\n<code class=\"language-plaintext highlighter-rouge\">IMAGE_ALL_PLATFORMS</code> variable with a comma separated list of <code class=\"language-plaintext highlighter-rouge\">OS/ARCH</code> tuples.</p>\n\n<h4 id=\"build-the-manifest-list-with-a-container-image-per-arch\">Build the manifest-list with a container image per arch</h4>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>make image-all\n</code></pre> </div></div>\n\n<p>Currently <code class=\"language-plaintext highlighter-rouge\">docker</code> does not support loading of manifest-lists meaning the images\nare not shown when executing <code class=\"language-plaintext highlighter-rouge\">docker images</code>, see:\n<a href=\"https://github.com/docker/buildx/issues/59\">buildx issue #59</a>.</p>\n\n<h4 id=\"push-the-manifest-list-with-container-image-per-arch\">Push the manifest-list with container image per arch</h4>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>make push-all\n</code></pre> </div></div>\n\n<p>The resulting container image can be used in the same way on each arch by pulling\ne.g. <code class=\"language-plaintext highlighter-rouge\">node-feature-discovery:v0.13.6</code> without specifying the\narchitecture. The manifest-list will take care of providing the right\narchitecture image.</p>\n\n<h4 id=\"change-the-job-spec-to-use-your-custom-image-optional\">Change the job spec to use your custom image (optional)</h4>\n\n<p>To use your published image from the step above instead of the\n<code class=\"language-plaintext highlighter-rouge\">registry.k8s.io/nfd/node-feature-discovery</code> image, edit <code class=\"language-plaintext highlighter-rouge\">image</code>\nattribute in the spec template(s) to the new location\n(<code class=\"language-plaintext highlighter-rouge\"><registry-name>/<image-name>[:<version>]</code>).</p>\n\n<h3 id=\"deployment\">Deployment</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">yamls</code> makefile generates a <code class=\"language-plaintext highlighter-rouge\">kustomization.yaml</code> matching your locally\nbuilt image and using the <code class=\"language-plaintext highlighter-rouge\">deploy/overlays/default</code> deployment. See\n<a href=\"#customizing-the-build\">build customization</a> below for configurability, e.g.\nchanging the deployment namespace.</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nv\">K8S_NAMESPACE</span><span class=\"o\">=</span>my-ns make yamls\nkubectl apply <span class=\"nt\">-k</span> <span class=\"nb\">.</span>\n</code></pre> </div></div>\n\n<p>You can use alternative deployment methods by modifying the auto-generated\nkustomization file. For example, deploying worker and master in the same pod by\npointing to <code class=\"language-plaintext highlighter-rouge\">deployment/overlays/default-combined</code>.</p>\n\n<h3 id=\"building-locally\">Building locally</h3>\n\n<p>You can also build the binaries locally</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>make build\n</code></pre> </div></div>\n\n<p>This will compile binaries under <code class=\"language-plaintext highlighter-rouge\">bin/</code></p>\n\n<h3 id=\"customizing-the-build\">Customizing the build</h3>\n\n<p>There are several Makefile variables that control the build process and the\nname of the resulting container image. The following are targeted targeted for\nbuild customization and they can be specified via environment variables or\nmakefile overrides.</p>\n\n<table>\n <thead>\n <tr>\n <th>Variable</th>\n <th>Description</th>\n <th>Default value</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>HOSTMOUNT_PREFIX</td>\n <td>Prefix of system directories for feature discovery (local builds)</td>\n <td>/ (<em>local builds</em>) /host- (<em>container builds</em>)</td>\n </tr>\n <tr>\n <td>IMAGE_BUILD_CMD</td>\n <td>Command to build the image</td>\n <td>docker build</td>\n </tr>\n <tr>\n <td>IMAGE_BUILD_EXTRA_OPTS</td>\n <td>Extra options to pass to build command</td>\n <td><em>empty</em></td>\n </tr>\n <tr>\n <td>IMAGE_BUILDX_CMD</td>\n <td>Command to build and push multi-arch images with buildx</td>\n <td>DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build –platform=${IMAGE_ALL_PLATFORMS} –progress=auto –pull</td>\n </tr>\n <tr>\n <td>IMAGE_ALL_PLATFORMS</td>\n <td>Comma separated list of OS/ARCH tuples for mulit-arch builds</td>\n <td>linux/amd64,linux/arm64</td>\n </tr>\n <tr>\n <td>IMAGE_PUSH_CMD</td>\n <td>Command to push the image to remote registry</td>\n <td>docker push</td>\n </tr>\n <tr>\n <td>IMAGE_REGISTRY</td>\n <td>Container image registry to use</td>\n <td>registry.k8s.io/nfd</td>\n </tr>\n <tr>\n <td>IMAGE_TAG_NAME</td>\n <td>Container image tag name</td>\n <td><nfd version></td>\n </tr>\n <tr>\n <td>IMAGE_EXTRA_TAG_NAMES</td>\n <td>Additional container image tag(s) to create when building image</td>\n <td><em>empty</em></td>\n </tr>\n <tr>\n <td>K8S_NAMESPACE</td>\n <td>nfd-master and nfd-worker namespace</td>\n <td>node-feature-discovery</td>\n </tr>\n <tr>\n <td>KUBECONFIG</td>\n <td>Kubeconfig for running e2e-tests</td>\n <td><em>empty</em></td>\n </tr>\n <tr>\n <td>E2E_TEST_CONFIG</td>\n <td>Parameterization file of e2e-tests (see <a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.13.6/test/e2e/e2e-test-config.exapmle.yaml\">example</a>)</td>\n <td><em>empty</em></td>\n </tr>\n <tr>\n <td>E2E_PULL_IF_NOT_PRESENT</td>\n <td>True-ish value makes the image pull policy IfNotPresent (to be used only in e2e tests)</td>\n <td>false</td>\n </tr>\n <tr>\n <td>OPENSHIFT</td>\n <td>Non-empty value enables OpenShift specific support (currently only effective in e2e tests)</td>\n <td><em>empty</em></td>\n </tr>\n </tbody>\n</table>\n\n<p>For example, to use a custom registry:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>make <span class=\"nv\">IMAGE_REGISTRY</span><span class=\"o\">=</span><my custom registry uri>\n</code></pre> </div></div>\n\n<p>Or to specify a build tool different from Docker, It can be done in 2 ways:</p>\n\n<ol>\n <li>\n <p>via environment</p>\n\n <div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> <span class=\"nv\">IMAGE_BUILD_CMD</span><span class=\"o\">=</span><span class=\"s2\">\"buildah bud\"</span> make\n</code></pre> </div> </div>\n </li>\n <li>\n <p>by overriding the variable value</p>\n\n <div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> make <span class=\"nv\">IMAGE_BUILD_CMD</span><span class=\"o\">=</span><span class=\"s2\">\"buildah bud\"</span>\n</code></pre> </div> </div>\n </li>\n</ol>\n\n<h3 id=\"testing\">Testing</h3>\n\n<p>Unit tests are automatically run as part of the container image build. You can\nalso run them manually in the source code tree by simply running:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>make <span class=\"nb\">test</span>\n</code></pre> </div></div>\n\n<p>End-to-end tests are built on top of the e2e test framework of Kubernetes, and,\nthey required a cluster to run them on. For running the tests on your test\ncluster you need to specify the kubeconfig to be used:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>make e2e-test <span class=\"nv\">KUBECONFIG</span><span class=\"o\">=</span><span class=\"nv\">$HOME</span>/.kube/config\n</code></pre> </div></div>\n\n<h2 id=\"running-locally\">Running locally</h2>\n\n<p>You can run NFD locally, either directly on your host OS or in containers for\ntesting and development purposes. This may be useful e.g. for checking\nfeatures-detection.</p>\n\n<h3 id=\"nfd-master\">NFD-Master</h3>\n\n<p>When running as a standalone container labeling is expected to fail because\nKubernetes API is not available. Thus, it is recommended to use <code class=\"language-plaintext highlighter-rouge\">-no-publish</code>\ncommand line flag. E.g.</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nv\">$ </span><span class=\"nb\">export </span><span class=\"nv\">NFD_CONTAINER_IMAGE</span><span class=\"o\">=</span>registry.k8s.io/nfd/node-feature-discovery:v0.13.6\n<span class=\"nv\">$ </span>docker run <span class=\"nt\">--rm</span> <span class=\"nt\">--name</span><span class=\"o\">=</span>nfd-test <span class=\"k\">${</span><span class=\"nv\">NFD_CONTAINER_IMAGE</span><span class=\"k\">}</span> nfd-master <span class=\"nt\">-no-publish</span>\n2019/02/01 14:48:21 Node Feature Discovery Master <NFD_VERSION>\n2019/02/01 14:48:21 gRPC server serving on port: 8080\n</code></pre> </div></div>\n\n<h3 id=\"nfd-worker\">NFD-Worker</h3>\n\n<p>In order to run nfd-worker as a “stand-alone” container against your\nstandalone nfd-master you need to run them in the same network namespace:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nv\">$ </span>docker run <span class=\"nt\">--rm</span> <span class=\"nt\">--network</span><span class=\"o\">=</span>container:nfd-test <span class=\"k\">${</span><span class=\"nv\">NFD_CONTAINER_IMAGE</span><span class=\"k\">}</span> nfd-worker\n2019/02/01 14:48:56 Node Feature Discovery Worker <NFD_VERSION>\n...\n</code></pre> </div></div>\n\n<p>If you just want to try out feature discovery without connecting to nfd-master,\npass the <code class=\"language-plaintext highlighter-rouge\">-no-publish</code> flag to nfd-worker.</p>\n\n<p><strong>NOTE</strong> Some feature sources need certain directories and/or files from the\nhost mounted inside the NFD container. Thus, you need to provide Docker with the\ncorrect <code class=\"language-plaintext highlighter-rouge\">--volume</code> options in order for them to work correctly when run\nstand-alone directly with <code class=\"language-plaintext highlighter-rouge\">docker run</code>. See the\n<a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.13.6/deployment/components/common/worker-mounts.yaml\">default deployment</a>\nfor up-to-date information about the required volume mounts.</p>\n\n<h3 id=\"nfd-topology-updater\">NFD-Topology-Updater</h3>\n\n<p>In order to run nfd-topology-updater as a “stand-alone” container against your\nstandalone nfd-master you need to run them in the same network namespace:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nv\">$ </span>docker run <span class=\"nt\">--rm</span> <span class=\"nt\">--network</span><span class=\"o\">=</span>container:nfd-test <span class=\"k\">${</span><span class=\"nv\">NFD_CONTAINER_IMAGE</span><span class=\"k\">}</span> nfd-topology-updater\n2019/02/01 14:48:56 Node Feature Discovery Topology Updater <NFD_VERSION>\n...\n</code></pre> </div></div>\n\n<p>If you just want to try out feature discovery without connecting to nfd-master,\npass the <code class=\"language-plaintext highlighter-rouge\">-no-publish</code> flag to nfd-topology-updater.</p>\n\n<p>NOTE:</p>\n\n<p>NFD topology updater needs certain directories and/or files from the\nhost mounted inside the NFD container. Thus, you need to provide Docker with the\ncorrect <code class=\"language-plaintext highlighter-rouge\">--volume</code> options in order for them to work correctly when run\nstand-alone directly with <code class=\"language-plaintext highlighter-rouge\">docker run</code>. See the\n<a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.13.6/deployment/components/topology-updater/topologyupdater-mounts.yaml\">template spec</a>\nfor up-to-date information about the required volume mounts.</p>\n\n<p><a href=\"https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#monitoring-device-plugin-resources\">PodResource API</a> is a prerequisite for nfd-topology-updater.\nPreceding Kubernetes v1.23, the <code class=\"language-plaintext highlighter-rouge\">kubelet</code> must be started with the following flag:\n<code class=\"language-plaintext highlighter-rouge\">--feature-gates=KubeletPodResourcesGetAllocatable=true</code>.\nStarting Kubernetes v1.23, the <code class=\"language-plaintext highlighter-rouge\">GetAllocatableResources</code> is enabled by default\nthrough <code class=\"language-plaintext highlighter-rouge\">KubeletPodResourcesGetAllocatable</code> <a href=\"https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates\">feature gate</a>.</p>\n\n<h2 id=\"running-with-tilt\">Running with Tilt</h2>\n\n<p>Another option for building NFD locally is via Tilt tool, which can build container\nimages, push them to a local registry and reload your Kubernetes pods automatically.\nWhen using Tilt, you don’t have to build container images and re-deploy your pods\nmanually but instead let the Tilt take care of it. Tiltfile is a configuration file\nfor the Tilt and is located at the root directory. To develop NFD with Tilt, follow\nthe steps below.</p>\n\n<h3 id=\"prerequisites\">Prerequisites</h3>\n\n<ol>\n <li>Install <a href=\"https://docs.docker.com/engine/install/\">Docker</a></li>\n <li>Setup Docker as a non-root user.</li>\n <li>Install <a href=\"https://kubernetes.io/docs/tasks/tools/\">kubectl</a></li>\n <li>Install <a href=\"https://github.com/kubernetes-sigs/kustomize\">kustomize</a></li>\n <li>Install <a href=\"https://docs.tilt.dev/install.html\">tilt</a></li>\n <li>Create a local Kubernetes cluster</li>\n</ol>\n\n<p>To start up your Tilt development environment, just run</p>\n\n<div class=\"language-shell highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>tilt up\n</code></pre> </div></div>\n\n<p>at the root of your local NFD codebase. Tilt will start a web interface in the\nlocalhost and port 10350. From the web interface, you are able to see how NFD worker\nand master are progressing, watch their build and runtime logs. Once your code changes\nare saved locally, Tilt will notice it and re-build the container image from the\ncurrent code, push the image to the registry and re-deploy NFD pods with the latest\ncontainer image.</p>\n\n<h3 id=\"environment-variables\">Environment variables</h3>\n\n<p>To override environment variables used in the Tiltfile during image build,\nexport them in your current terminal before starting Tilt.</p>\n\n<div class=\"language-shell highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nb\">export </span><span class=\"nv\">IMAGE_TAG_NAME</span><span class=\"o\">=</span><span class=\"s2\">\"v1\"</span>\ntilt up\n</code></pre> </div></div>\n\n<p>This will override the default value(<code class=\"language-plaintext highlighter-rouge\">master</code>) of <code class=\"language-plaintext highlighter-rouge\">IMAGE_TAG_NAME</code> variable defined\nin the Tiltfile.</p>\n\n<h2 id=\"documentation\">Documentation</h2>\n\n<p>All documentation resides under the\n<a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/tree/v0.13.6/docs\">docs</a>\ndirectory in the source tree. It is designed to be served as a html site by\n<a href=\"https://pages.github.com/\">GitHub Pages</a>.</p>\n\n<p>Building the documentation is containerized in order to fix the build\nenvironment. The recommended way for developing documentation is to run:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>make site-serve\n</code></pre> </div></div>\n\n<p>This will build the documentation in a container and serve it under\n<a href=\"http://localhost:4000/\">localhost:4000/</a> making it easy to verify the results.\nAny changes made to the <code class=\"language-plaintext highlighter-rouge\">docs/</code> will automatically re-trigger a rebuild and are\nreflected in the served content and can be inspected with a simple browser\nrefresh.</p>\n\n<p>In order to just build the html documentation run:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>make site-build\n</code></pre> </div></div>\n\n<p>This will generate html documentation under <code class=\"language-plaintext highlighter-rouge\">docs/_site/</code>.</p>\n\n<!-- Links -->\n","dir":"/developer-guide/","name":"index.md","path":"developer-guide/index.md","url":"/developer-guide/"},{"title":"Topology-Updater config reference","layout":"default","sort":6,"content":"<h1 class=\"no_toc\" id=\"configuration-file-reference-of-nfd-topology-updater\">Configuration file reference of nfd-topology-updater</h1>\n\n<h2 class=\"no_toc text-delta\" id=\"table-of-contents\">Table of contents</h2>\n\n<ol id=\"markdown-toc\">\n <li><a href=\"#excludelist\" id=\"markdown-toc-excludelist\">excludeList</a> <ol>\n <li><a href=\"#excludelist-1\" id=\"markdown-toc-excludelist-1\">excludeList.*</a></li>\n </ol>\n </li>\n</ol>\n\n<hr />\n\n<p>See the\n<a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.13.6/deployment/components/topology-updater-config/nfd-topology-updater.conf.example\">sample configuration file</a>\nfor a full example configuration.</p>\n\n<h2 id=\"excludelist\">excludeList</h2>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">excludeList</code> specifies a key-value map of allocated resources\nthat should not be examined by the topology-updater\nagent per node.\nEach key is a node name with a value as a list of resources\nthat should not be examined by the agent for that specific node.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">excludeList</span><span class=\"pi\">:</span>\n <span class=\"na\">nodeA</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"nv\">hugepages-2Mi</span><span class=\"pi\">]</span>\n <span class=\"na\">nodeB</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"nv\">memory</span><span class=\"pi\">]</span>\n <span class=\"na\">nodeC</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"nv\">cpu</span><span class=\"pi\">,</span> <span class=\"nv\">hugepages-2Mi</span><span class=\"pi\">]</span>\n</code></pre> </div></div>\n\n<h3 id=\"excludelist-1\">excludeList.*</h3>\n<p><code class=\"language-plaintext highlighter-rouge\">excludeList.*</code> is a special value that use to specify all nodes.\nA resource that would be listed under this key, would be excluded from all nodes.</p>\n\n<p>Default: <em>empty</em></p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">excludeList</span><span class=\"pi\">:</span>\n <span class=\"s1\">'</span><span class=\"s\">*'</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"nv\">hugepages-2Mi</span><span class=\"pi\">]</span>\n</code></pre> </div></div>\n","dir":"/reference/","name":"topology-updater-configuration-reference.md","path":"reference/topology-updater-configuration-reference.md","url":"/reference/topology-updater-configuration-reference.html"},{"title":"Contributing","layout":"default","sort":6,"content":"<h1 id=\"contributing\">Contributing</h1>\n\n<hr />\n\n<h2 id=\"community\">Community</h2>\n\n<p>You can reach us via the following channels:</p>\n\n<ul>\n <li><a href=\"https://kubernetes.slack.com/messages/node-feature-discovery\">#node-feature-discovery</a>\nchannel in <a href=\"https://slack.k8s.io/\">Kubernetes Slack</a></li>\n <li><a href=\"https://groups.google.com/g/kubernetes-sig-node\">SIG-Node</a> mailing list</li>\n <li>File an\n<a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/issues/new\">issue</a>\nin this repository</li>\n</ul>\n\n<h2 id=\"governance\">Governance</h2>\n\n<p>This is a\n<a href=\"https://github.com/kubernetes/community/blob/master/sig-node/README.md\">SIG-node</a>\nsubproject, hosted under the\n<a href=\"https://github.com/kubernetes-sigs\">Kubernetes SIGs</a> organization in Github.\nThe project was established in 2016 and was migrated to Kubernetes SIGs in 2018.</p>\n\n<h2 id=\"license\">License</h2>\n\n<p>This is open source software released under the <a href=\"LICENSE\">Apache 2.0 License</a>.</p>\n","dir":"/contributing/","name":"index.md","path":"contributing/index.md","url":"/contributing/"},{"title":"Uninstallation","layout":"default","sort":6,"content":"<h1 class=\"no_toc\" id=\"uninstallation\">Uninstallation</h1>\n\n<h2 class=\"no_toc text-delta\" id=\"table-of-contents\">Table of contents</h2>\n\n<ol id=\"markdown-toc\">\n <li><a href=\"#removing-feature-labels\" id=\"markdown-toc-removing-feature-labels\">Removing feature labels</a></li>\n</ol>\n\n<hr />\n\n<p>Follow the uninstallation instructions of the deployment method used\n(<a href=\"/node-feature-discovery/v0.13/deployment/kustomize.html#uninstallation\">kustomize</a>,\n<a href=\"/node-feature-discovery/v0.13/deployment/helm.html#uninstalling-the-chart\">helm</a> or\n<a href=\"/node-feature-discovery/v0.13/deployment/operator.html#uninstallation\">operator</a>).</p>\n\n<h2 id=\"removing-feature-labels\">Removing feature labels</h2>\n\n<p>NFD-Master has a special <code class=\"language-plaintext highlighter-rouge\">-prune</code> command line flag for removing all\nnfd-related node labels, annotations, extended resources and taints from the\ncluster.</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>kubectl apply <span class=\"nt\">-k</span> https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/prune?ref<span class=\"o\">=</span>v0.13.6\nkubectl <span class=\"nt\">-n</span> node-feature-discovery <span class=\"nb\">wait </span>job.batch/nfd-master <span class=\"nt\">--for</span><span class=\"o\">=</span><span class=\"nv\">condition</span><span class=\"o\">=</span><span class=\"nb\">complete</span> <span class=\"o\">&&</span> <span class=\"se\">\\</span>\n kubectl delete <span class=\"nt\">-k</span> https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/prune?ref<span class=\"o\">=</span>v0.13.6\n</code></pre> </div></div>\n\n<p><strong>NOTE:</strong> You must run prune before removing the RBAC rules (serviceaccount,\nclusterrole and clusterrolebinding).</p>\n","dir":"/deployment/","name":"uninstallation.md","path":"deployment/uninstallation.md","url":"/deployment/uninstallation.html"},{"title":"NFD-Topology-Garbage-Collector","layout":"default","sort":6,"content":"<h1 class=\"no_toc\" id=\"nfd-topology-garbage-collector\">NFD-Topology-Garbage-Collector</h1>\n\n<hr />\n\n<p>NFD-Topology-Garbage-Collector is preferably run as a Kubernetes deployment\nwith one replica. It makes sure that all\n<a href=\"/node-feature-discovery/v0.13/usage/custom-resources.html#noderesourcetopology\">NodeResourceTopology</a>\nhave corresponding worker nodes and removes stale objects for worker nodes\nwhich are no longer part of Kubernetes cluster.</p>\n\n<p>This service watches for Node deletion events and removes NodeResourceTopology\nobjects upon them. It is also running periodically to make sure no event was\nmissed or NodeResourceTopology object was created without corresponding worker\nnode. The default garbage collector interval is set to 1h which is the value\nwhen no -gc-interval is specified.</p>\n\n<h2 id=\"topology-garbage-collector-configuration\">Topology-Garbage-Collector Configuration</h2>\n\n<p>In Helm deployments,\n(see <a href=\"/node-feature-discovery/v0.13/deployment/helm.html#topology-garbage-collector-parameters\">Topology Garbage Collector</a>\nfor parameters). NFD-Topology-Garbage-Collector will only be deployed when\ntopologyUpdater.enable is set to true.</p>\n","dir":"/usage/","name":"nfd-topology-gc.md","path":"usage/nfd-topology-gc.md","url":"/usage/nfd-topology-gc.html"},{"title":"Topology Garbage Collector Cmdline Reference","layout":"default","sort":7,"content":"<h1 id=\"nfd-topology-garbage-collector-commandline-flags\">NFD-Topology-Garbage-Collector Commandline Flags</h1>\n\n<h2 class=\"no_toc\" id=\"table-of-contents\">Table of Contents</h2>\n\n<ol class=\"no_toc text-delta\" id=\"markdown-toc\">\n <li><a href=\"#nfd-topology-garbage-collector-commandline-flags\" id=\"markdown-toc-nfd-topology-garbage-collector-commandline-flags\">NFD-Topology-Garbage-Collector Commandline Flags</a> <ol>\n <li><a href=\"#-h--help\" id=\"markdown-toc--h--help\">-h, -help</a></li>\n <li><a href=\"#-version\" id=\"markdown-toc--version\">-version</a></li>\n <li><a href=\"#-gc-interval\" id=\"markdown-toc--gc-interval\">-gc-interval</a></li>\n </ol>\n </li>\n</ol>\n\n<hr />\n\n<p>To quickly view available command line flags execute <code class=\"language-plaintext highlighter-rouge\">nfd-topology-gc -help</code>.\nIn a docker container:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>docker run registry.k8s.io/nfd/node-feature-discovery:v0.13.6 <span class=\"se\">\\</span>\nnfd-topology-gc <span class=\"nt\">-help</span>\n</code></pre> </div></div>\n\n<h3 id=\"-h--help\">-h, -help</h3>\n\n<p>Print usage and exit.</p>\n\n<h3 id=\"-version\">-version</h3>\n\n<p>Print version and exit.</p>\n\n<h3 id=\"-gc-interval\">-gc-interval</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-gc-interval</code> specifies the interval between periodic garbage collector runs.</p>\n\n<p>Default: 1h</p>\n\n<p>Example:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nfd-topology-gc <span class=\"nt\">-gc-interval</span><span class=\"o\">=</span>1h\n</code></pre> </div></div>\n","dir":"/reference/","name":"topology-gc-commandline-reference.md","path":"reference/topology-gc-commandline-reference.md","url":"/reference/topology-gc-commandline-reference.html"},{"title":"CRDs","layout":"default","sort":7,"content":"<h1 class=\"no_toc\" id=\"custom-resources\">Custom Resources</h1>\n\n<h2 class=\"no_toc text-delta\" id=\"table-of-contents\">Table of contents</h2>\n\n<ol id=\"markdown-toc\">\n <li><a href=\"#nodefeature\" id=\"markdown-toc-nodefeature\">NodeFeature</a></li>\n <li><a href=\"#nodefeaturerule\" id=\"markdown-toc-nodefeaturerule\">NodeFeatureRule</a></li>\n <li><a href=\"#noderesourcetopology\" id=\"markdown-toc-noderesourcetopology\">NodeResourceTopology</a></li>\n</ol>\n\n<hr />\n\n<p>NFD uses some Kubernetes <a href=\"https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/\">custom resources</a>.</p>\n\n<h2 id=\"nodefeature\">NodeFeature</h2>\n\n<p><strong>EXPERIMENTAL</strong>\nNodeFeature is an NFD-specific custom resource for communicating node\nfeatures and node labeling requests. Support for NodeFeature objects is\ndisabled by default. If enabled, nfd-master watches for NodeFeature objects,\nlabels nodes as specified and uses the listed features as input when evaluating\n<a href=\"#nodefeaturerule\">NodeFeatureRule</a>s. NodeFeature objects can be used for\nimplementing 3rd party extensions (see\n<a href=\"/node-feature-discovery/v0.13/usage/customization-guide.html#nodefeature-custom-resource\">customization guide</a> for more\ndetails).</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">apiVersion</span><span class=\"pi\">:</span> <span class=\"s\">nfd.k8s-sigs.io/v1alpha1</span>\n<span class=\"na\">kind</span><span class=\"pi\">:</span> <span class=\"s\">NodeFeature</span>\n<span class=\"na\">metadata</span><span class=\"pi\">:</span>\n <span class=\"na\">labels</span><span class=\"pi\">:</span>\n <span class=\"s\">nfd.node.kubernetes.io/node-name</span><span class=\"pi\">:</span> <span class=\"s\">node-1</span>\n <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s\">node-1-vendor-features</span>\n<span class=\"na\">spec</span><span class=\"pi\">:</span>\n <span class=\"na\">features</span><span class=\"pi\">:</span>\n <span class=\"na\">instances</span><span class=\"pi\">:</span>\n <span class=\"s\">vendor.device</span><span class=\"pi\">:</span>\n <span class=\"na\">elements</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">attributes</span><span class=\"pi\">:</span>\n <span class=\"na\">model</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">xpu-1\"</span>\n <span class=\"na\">memory</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">4000\"</span>\n <span class=\"na\">type</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">fast\"</span>\n <span class=\"pi\">-</span> <span class=\"na\">attributes</span><span class=\"pi\">:</span>\n <span class=\"na\">model</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">xpu-2\"</span>\n <span class=\"na\">memory</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">16000\"</span>\n <span class=\"na\">type</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">slow\"</span>\n <span class=\"na\">labels</span><span class=\"pi\">:</span>\n <span class=\"na\">vendor-xpu-present</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">true\"</span>\n</code></pre> </div></div>\n\n<h2 id=\"nodefeaturerule\">NodeFeatureRule</h2>\n\n<p>NodeFeatureRule is an NFD-specific custom resource that is designed for\nrule-based custom labeling of nodes. NFD-Master watches for NodeFeatureRule\nobjects in the cluster and labels nodes according to the rules within. Some use\ncases are e.g. application specific labeling in a specific environments or\nbeing distributed by hardware vendors to create specific labels for their\ndevices.</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">apiVersion</span><span class=\"pi\">:</span> <span class=\"s\">nfd.k8s-sigs.io/v1alpha1</span>\n<span class=\"na\">kind</span><span class=\"pi\">:</span> <span class=\"s\">NodeFeatureRule</span>\n<span class=\"na\">metadata</span><span class=\"pi\">:</span>\n <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s\">example-rule</span>\n<span class=\"na\">spec</span><span class=\"pi\">:</span>\n <span class=\"na\">rules</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">example</span><span class=\"nv\"> </span><span class=\"s\">rule\"</span>\n <span class=\"na\">labels</span><span class=\"pi\">:</span>\n <span class=\"s2\">\"</span><span class=\"s\">example-custom-feature\"</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">true\"</span>\n <span class=\"c1\"># Label is created if all of the rules below match</span>\n <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span>\n <span class=\"c1\"># Match if \"veth\" kernel module is loaded</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">kernel.loadedmodule</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">veth</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">Exists</span><span class=\"pi\">}</span>\n <span class=\"c1\"># Match if any PCI device with vendor 8086 exists in the system</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">pci.device</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">vendor</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">In</span><span class=\"pi\">,</span> <span class=\"nv\">value</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">8086\"</span><span class=\"pi\">]}</span>\n</code></pre> </div></div>\n\n<p>See the\n<a href=\"/node-feature-discovery/v0.13/usage/customization-guide.html#node-feature-rule-custom-resource\">Customization guide</a>\nfor full documentation of the NodeFeatureRule resource and its usage.</p>\n\n<h2 id=\"noderesourcetopology\">NodeResourceTopology</h2>\n\n<p>When run with NFD-Topology-Updater, NFD creates NodeResourceTopology objects\ncorresponding to node resource hardware topology such as:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">apiVersion</span><span class=\"pi\">:</span> <span class=\"s\">topology.node.k8s.io/v1alpha1</span>\n<span class=\"na\">kind</span><span class=\"pi\">:</span> <span class=\"s\">NodeResourceTopology</span>\n<span class=\"na\">metadata</span><span class=\"pi\">:</span>\n <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s\">node1</span>\n<span class=\"na\">topologyPolicies</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">SingleNUMANodeContainerLevel\"</span><span class=\"pi\">]</span>\n<span class=\"na\">zones</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s\">node-0</span>\n <span class=\"na\">type</span><span class=\"pi\">:</span> <span class=\"s\">Node</span>\n <span class=\"na\">resources</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s\">cpu</span>\n <span class=\"na\">capacity</span><span class=\"pi\">:</span> <span class=\"m\">20</span>\n <span class=\"na\">allocatable</span><span class=\"pi\">:</span> <span class=\"m\">16</span>\n <span class=\"na\">available</span><span class=\"pi\">:</span> <span class=\"m\">10</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s\">vendor/nic1</span>\n <span class=\"na\">capacity</span><span class=\"pi\">:</span> <span class=\"m\">3</span>\n <span class=\"na\">allocatable</span><span class=\"pi\">:</span> <span class=\"m\">3</span>\n <span class=\"na\">available</span><span class=\"pi\">:</span> <span class=\"m\">3</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s\">node-1</span>\n <span class=\"na\">type</span><span class=\"pi\">:</span> <span class=\"s\">Node</span>\n <span class=\"na\">resources</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s\">cpu</span>\n <span class=\"na\">capacity</span><span class=\"pi\">:</span> <span class=\"m\">30</span>\n <span class=\"na\">allocatable</span><span class=\"pi\">:</span> <span class=\"m\">30</span>\n <span class=\"na\">available</span><span class=\"pi\">:</span> <span class=\"m\">15</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s\">vendor/nic2</span>\n <span class=\"na\">capacity</span><span class=\"pi\">:</span> <span class=\"m\">6</span>\n <span class=\"na\">allocatable</span><span class=\"pi\">:</span> <span class=\"m\">6</span>\n <span class=\"na\">available</span><span class=\"pi\">:</span> <span class=\"m\">6</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s\">node-2</span>\n <span class=\"na\">type</span><span class=\"pi\">:</span> <span class=\"s\">Node</span>\n <span class=\"na\">resources</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s\">cpu</span>\n <span class=\"na\">capacity</span><span class=\"pi\">:</span> <span class=\"m\">30</span>\n <span class=\"na\">allocatable</span><span class=\"pi\">:</span> <span class=\"m\">30</span>\n <span class=\"na\">available</span><span class=\"pi\">:</span> <span class=\"m\">15</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s\">vendor/nic1</span>\n <span class=\"na\">capacity</span><span class=\"pi\">:</span> <span class=\"m\">3</span>\n <span class=\"na\">allocatable</span><span class=\"pi\">:</span> <span class=\"m\">3</span>\n <span class=\"na\">available</span><span class=\"pi\">:</span> <span class=\"m\">3</span>\n</code></pre> </div></div>\n\n<p>The NodeResourceTopology objects created by NFD can be used to gain insight\ninto the allocatable resources along with the granularity of those resources at\na per-zone level (represented by node-0 and node-1 in the above example) or can\nbe used by an external entity (e.g. topology-aware scheduler plugin) to take an\naction based on the gathered information.</p>\n\n<!-- Links -->\n","dir":"/usage/","name":"custom-resources.md","path":"usage/custom-resources.md","url":"/usage/custom-resources.html"},{"title":"Customization guide","layout":"default","sort":8,"content":"<h1 class=\"no_toc\" id=\"customization-guide\">Customization guide</h1>\n\n<h2 class=\"no_toc text-delta\" id=\"table-of-contents\">Table of contents</h2>\n\n<ol id=\"markdown-toc\">\n <li><a href=\"#overview\" id=\"markdown-toc-overview\">Overview</a></li>\n <li><a href=\"#nodefeature-custom-resource\" id=\"markdown-toc-nodefeature-custom-resource\">NodeFeature custom resource</a> <ol>\n <li><a href=\"#a-nodefeature-example\" id=\"markdown-toc-a-nodefeature-example\">A NodeFeature example</a></li>\n <li><a href=\"#feature-types\" id=\"markdown-toc-feature-types\">Feature types</a></li>\n </ol>\n </li>\n <li><a href=\"#nodefeaturerule-custom-resource\" id=\"markdown-toc-nodefeaturerule-custom-resource\">NodeFeatureRule custom resource</a> <ol>\n <li><a href=\"#a-nodefeaturerule-example\" id=\"markdown-toc-a-nodefeaturerule-example\">A NodeFeatureRule example</a></li>\n <li><a href=\"#nodefeaturerule-tainting-feature\" id=\"markdown-toc-nodefeaturerule-tainting-feature\">NodeFeatureRule tainting feature</a></li>\n </ol>\n </li>\n <li><a href=\"#local-feature-source\" id=\"markdown-toc-local-feature-source\">Local feature source</a> <ol>\n <li><a href=\"#a-hook-example\" id=\"markdown-toc-a-hook-example\">A hook example</a></li>\n <li><a href=\"#hooks\" id=\"markdown-toc-hooks\">Hooks</a></li>\n <li><a href=\"#feature-files\" id=\"markdown-toc-feature-files\">Feature files</a></li>\n <li><a href=\"#input-format\" id=\"markdown-toc-input-format\">Input format</a></li>\n <li><a href=\"#mounts\" id=\"markdown-toc-mounts\">Mounts</a></li>\n </ol>\n </li>\n <li><a href=\"#custom-feature-source\" id=\"markdown-toc-custom-feature-source\">Custom feature source</a> <ol>\n <li><a href=\"#an-example-custom-feature-source-configuration\" id=\"markdown-toc-an-example-custom-feature-source-configuration\">An example custom feature source configuration</a></li>\n <li><a href=\"#additional-configuration-directory\" id=\"markdown-toc-additional-configuration-directory\">Additional configuration directory</a></li>\n </ol>\n </li>\n <li><a href=\"#node-labels\" id=\"markdown-toc-node-labels\">Node labels</a></li>\n <li><a href=\"#label-rule-format\" id=\"markdown-toc-label-rule-format\">Label rule format</a> <ol>\n <li><a href=\"#fields\" id=\"markdown-toc-fields\">Fields</a></li>\n <li><a href=\"#available-features\" id=\"markdown-toc-available-features\">Available features</a></li>\n <li><a href=\"#templating\" id=\"markdown-toc-templating\">Templating</a></li>\n <li><a href=\"#backreferences\" id=\"markdown-toc-backreferences\">Backreferences</a></li>\n <li><a href=\"#examples\" id=\"markdown-toc-examples\">Examples</a></li>\n </ol>\n </li>\n <li><a href=\"#legacy-custom-rule-syntax\" id=\"markdown-toc-legacy-custom-rule-syntax\">Legacy custom rule syntax</a> <ol>\n <li><a href=\"#general-nomenclature-and-definitions\" id=\"markdown-toc-general-nomenclature-and-definitions\">General nomenclature and definitions</a></li>\n <li><a href=\"#custom-features-format-using-the-nomenclature-defined-above\" id=\"markdown-toc-custom-features-format-using-the-nomenclature-defined-above\">Custom features format (using the nomenclature defined above)</a></li>\n <li><a href=\"#matching-process\" id=\"markdown-toc-matching-process\">Matching process</a></li>\n <li><a href=\"#rules\" id=\"markdown-toc-rules\">Rules</a></li>\n <li><a href=\"#legacy-custom-rule-example\" id=\"markdown-toc-legacy-custom-rule-example\">Legacy custom rule example</a></li>\n </ol>\n </li>\n</ol>\n\n<hr />\n\n<h2 id=\"overview\">Overview</h2>\n\n<p>NFD provides multiple extension points for vendor and application specific\nlabeling:</p>\n\n<ul>\n <li><a href=\"#nodefeature-custom-resource\"><code class=\"language-plaintext highlighter-rouge\">NodeFeature</code></a> (EXPERIMENTAL) objects can be\nused to communicate “raw” node features and node labeling requests to\nnfd-master.</li>\n <li><a href=\"#nodefeaturerule-custom-resource\"><code class=\"language-plaintext highlighter-rouge\">NodeFeatureRule</code></a> objects provide a way to\ndeploy custom labeling rules via the Kubernetes API.</li>\n <li><a href=\"#local-feature-source\"><code class=\"language-plaintext highlighter-rouge\">local</code></a> feature source of nfd-worker creates\nlabels by executing hooks and reading files.</li>\n <li><a href=\"#custom-feature-source\"><code class=\"language-plaintext highlighter-rouge\">custom</code></a> feature source of nfd-worker creates\nlabels based on user-specified rules.</li>\n</ul>\n\n<h2 id=\"nodefeature-custom-resource\">NodeFeature custom resource</h2>\n\n<p><strong>EXPERIMENTAL</strong>\nNodeFeature objects provide a way for 3rd party extensions to advertise custom\nfeatures, both as “raw” features that serve as input to\n<a href=\"#nodefeaturerule-custom-resource\">NodeFeatureRule</a> objects and as feature\nlabels directly.</p>\n\n<p>Note that RBAC rules must be created for each extension for them to be able to\ncreate and manipulate NodeFeature objects in their namespace.</p>\n\n<p>Support for NodeFeature CRD API is enabled with the <code class=\"language-plaintext highlighter-rouge\">-enable-nodefeature-api</code>\ncommand line flag. This flag must be specified for both nfd-master and\nnfd-worker as it will disable the gRPC communication between them.</p>\n\n<h3 id=\"a-nodefeature-example\">A NodeFeature example</h3>\n\n<p>Consider the following referential example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">apiVersion</span><span class=\"pi\">:</span> <span class=\"s\">nfd.k8s-sigs.io/v1alpha1</span>\n<span class=\"na\">kind</span><span class=\"pi\">:</span> <span class=\"s\">NodeFeature</span>\n<span class=\"na\">metadata</span><span class=\"pi\">:</span>\n <span class=\"na\">labels</span><span class=\"pi\">:</span>\n <span class=\"s\">nfd.node.kubernetes.io/node-name</span><span class=\"pi\">:</span> <span class=\"s\">node-1</span>\n <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s\">vendor-features-for-node-1</span>\n<span class=\"na\">spec</span><span class=\"pi\">:</span>\n <span class=\"c1\"># Features for NodeFeatureRule matching</span>\n <span class=\"na\">features</span><span class=\"pi\">:</span>\n <span class=\"na\">flags</span><span class=\"pi\">:</span>\n <span class=\"s\">vendor.flags</span><span class=\"pi\">:</span>\n <span class=\"na\">elements</span><span class=\"pi\">:</span>\n <span class=\"na\">feature-x</span><span class=\"pi\">:</span> <span class=\"pi\">{}</span>\n <span class=\"na\">feature-y</span><span class=\"pi\">:</span> <span class=\"pi\">{}</span>\n <span class=\"na\">attributes</span><span class=\"pi\">:</span>\n <span class=\"s\">vendor.config</span><span class=\"pi\">:</span>\n <span class=\"na\">elements</span><span class=\"pi\">:</span>\n <span class=\"na\">setting-a</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">auto\"</span>\n <span class=\"na\">knob-b</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">123\"</span>\n <span class=\"na\">instances</span><span class=\"pi\">:</span>\n <span class=\"s\">vendor.devices</span><span class=\"pi\">:</span>\n <span class=\"na\">elements</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">attributes</span><span class=\"pi\">:</span>\n <span class=\"na\">model</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">dev-1000\"</span>\n <span class=\"na\">vendor</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">acme\"</span>\n <span class=\"pi\">-</span> <span class=\"na\">attributes</span><span class=\"pi\">:</span>\n <span class=\"na\">model</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">dev-2000\"</span>\n <span class=\"na\">vendor</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">acme\"</span>\n <span class=\"c1\"># Labels to be created</span>\n <span class=\"na\">labels</span><span class=\"pi\">:</span>\n <span class=\"s\">vendor-feature.enabled</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">true\"</span>\n</code></pre> </div></div>\n\n<p>The object targets node named <code class=\"language-plaintext highlighter-rouge\">node-1</code>. It lists two “flag type” features under\nthe <code class=\"language-plaintext highlighter-rouge\">vendor.flags</code> domain, two “attribute type” features and under the\n<code class=\"language-plaintext highlighter-rouge\">vendor.config</code> domain and two “instance type” features under the\n<code class=\"language-plaintext highlighter-rouge\">vendor.devices</code> domain. These features will not be directly affecting the node\nlabels but they will be used as input when the\n<a href=\"#nodefeaturerule-custom-resource\"><code class=\"language-plaintext highlighter-rouge\">NodeFeatureRule</code></a> objects are evaluated.</p>\n\n<p>In addition, the example requests directly the\n<code class=\"language-plaintext highlighter-rouge\">feature.node.kubenernetes.io/vendor-feature.enabled=true</code> node label to be\ncreated.</p>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">nfd.node.kubernetes.io/node-name=<node-name></code> must be in place for each\nNodeFeature object as NFD uses it to determine the node which it is targeting.</p>\n\n<h3 id=\"feature-types\">Feature types</h3>\n\n<p>Features are divided into three different types:</p>\n\n<ul>\n <li><strong>flag</strong> features: a set of names without any associated values, e.g. CPUID\nflags or loaded kernel modules</li>\n <li><strong>attribute</strong> features: a set of names each of which has a single value\nassociated with it (essentially a map of key-value pairs), e.g. kernel config\nflags or os release information</li>\n <li><strong>instance</strong> features: a list of instances, each of which has multiple\nattributes (key-value pairs of their own) associated with it, e.g. PCI or USB\ndevices</li>\n</ul>\n\n<h2 id=\"nodefeaturerule-custom-resource\">NodeFeatureRule custom resource</h2>\n\n<p><code class=\"language-plaintext highlighter-rouge\">NodeFeatureRule</code> objects provide an easy way to create vendor or application\nspecific labels and taints. It uses a flexible rule-based mechanism for creating\nlabels and optionally taints based on node features.</p>\n\n<h3 id=\"a-nodefeaturerule-example\">A NodeFeatureRule example</h3>\n\n<p>Consider the following referential example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">apiVersion</span><span class=\"pi\">:</span> <span class=\"s\">nfd.k8s-sigs.io/v1alpha1</span>\n<span class=\"na\">kind</span><span class=\"pi\">:</span> <span class=\"s\">NodeFeatureRule</span>\n<span class=\"na\">metadata</span><span class=\"pi\">:</span>\n <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s\">my-sample-rule-object</span>\n<span class=\"na\">spec</span><span class=\"pi\">:</span>\n <span class=\"na\">rules</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">my</span><span class=\"nv\"> </span><span class=\"s\">sample</span><span class=\"nv\"> </span><span class=\"s\">rule\"</span>\n <span class=\"na\">labels</span><span class=\"pi\">:</span>\n <span class=\"s2\">\"</span><span class=\"s\">my-sample-feature\"</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">true\"</span>\n <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">kernel.loadedmodule</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">dummy</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">Exists</span><span class=\"pi\">}</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">kernel.config</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">X86</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">In</span><span class=\"pi\">,</span> <span class=\"nv\">value</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">y\"</span><span class=\"pi\">]}</span>\n</code></pre> </div></div>\n\n<p>It specifies one rule which creates node label\n<code class=\"language-plaintext highlighter-rouge\">feature.node.kubenernetes.io/my-sample-feature=true</code> if both of the following\nconditions are true (<code class=\"language-plaintext highlighter-rouge\">matchFeatures</code> implements a logical AND over the\nmatchers):</p>\n\n<ul>\n <li>The <code class=\"language-plaintext highlighter-rouge\">dummy</code> network driver module has been loaded</li>\n <li>X86 option in kernel config is set to <code class=\"language-plaintext highlighter-rouge\">=y</code></li>\n</ul>\n\n<p>Create a <code class=\"language-plaintext highlighter-rouge\">NodeFeatureRule</code> with a yaml file:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>kubectl apply <span class=\"nt\">-f</span> https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/v0.13.6/examples/nodefeaturerule.yaml\n</code></pre> </div></div>\n\n<p>Now, on X86 platforms the feature label appears after doing <code class=\"language-plaintext highlighter-rouge\">modprobe dummy</code> on\na system and correspondingly the label is removed after <code class=\"language-plaintext highlighter-rouge\">rmmod dummy</code>. Note a\nre-labeling delay up to the sleep-interval of nfd-worker (1 minute by default).</p>\n\n<p>See <a href=\"#label-rule-format\">Label rule format</a> for detailed description of\navailable fields and how to write labeling rules.</p>\n\n<h3 id=\"nodefeaturerule-tainting-feature\">NodeFeatureRule tainting feature</h3>\n\n<p>This feature is experimental.</p>\n\n<p>In some circumstances, it is desirable to keep nodes with specialized hardware\naway from running general workload and instead leave them for workloads that\nneed the specialized hardware. One way to achieve it is to taint the nodes with\nthe specialized hardware and add corresponding toleration to pods that require\nthe special hardware. NFD offers node tainting functionality which is disabled\nby default. User can define one or more custom taints via the <code class=\"language-plaintext highlighter-rouge\">taints</code> field of\nthe NodeFeatureRule CR. The same rule-based mechanism is applied here and the\nNFD taints only rule matching nodes.</p>\n\n<p>To enable the tainting feature, <code class=\"language-plaintext highlighter-rouge\">--enable-taints</code> flag needs to be set to <code class=\"language-plaintext highlighter-rouge\">true</code>.\nIf the flag <code class=\"language-plaintext highlighter-rouge\">--enable-taints</code> is set to <code class=\"language-plaintext highlighter-rouge\">false</code> (i.e. disabled), taints defined in\nthe NodeFeatureRule CR have no effect and will be ignored by the NFD master.</p>\n\n<p><strong>NOTE</strong>: Before enabling any taints, make sure to edit nfd-worker daemonset to\ntolerate the taints to be created. Otherwise, already running pods that do not\ntolerate the taint are evicted immediately from the node including the nfd-worker\npod.</p>\n\n<p>Example NodeFeatureRule with custom taints:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">apiVersion</span><span class=\"pi\">:</span> <span class=\"s\">nfd.k8s-sigs.io/v1alpha1</span>\n<span class=\"na\">kind</span><span class=\"pi\">:</span> <span class=\"s\">NodeFeatureRule</span>\n<span class=\"na\">metadata</span><span class=\"pi\">:</span>\n <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s\">my-sample-rule-object</span>\n<span class=\"na\">spec</span><span class=\"pi\">:</span>\n <span class=\"na\">rules</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">my</span><span class=\"nv\"> </span><span class=\"s\">sample</span><span class=\"nv\"> </span><span class=\"s\">taint</span><span class=\"nv\"> </span><span class=\"s\">rule\"</span>\n <span class=\"na\">taints</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">effect</span><span class=\"pi\">:</span> <span class=\"s\">PreferNoSchedule</span>\n <span class=\"na\">key</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">feature.node.kubernetes.io/special-node\"</span>\n <span class=\"na\">value</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">true\"</span>\n <span class=\"pi\">-</span> <span class=\"na\">effect</span><span class=\"pi\">:</span> <span class=\"s\">NoExecute</span>\n <span class=\"na\">key</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">feature.node.kubernetes.io/dedicated-node\"</span>\n <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">kernel.loadedmodule</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">dummy</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">Exists</span><span class=\"pi\">}</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">kernel.config</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">X86</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">In</span><span class=\"pi\">,</span> <span class=\"nv\">value</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">y\"</span><span class=\"pi\">]}</span>\n</code></pre> </div></div>\n\n<p>In this example, if the <code class=\"language-plaintext highlighter-rouge\">my sample taint rule</code> rule is matched, <code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/pci-0300_1d0f.present=true:NoExecute</code>\nand <code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/cpu-cpuid.ADX:NoExecute</code> taints are set on the node.</p>\n\n<p>There are some limitations to the namespace part (i.e. prefix/) of the taint\nkey:</p>\n\n<ul>\n <li><code class=\"language-plaintext highlighter-rouge\">kubernetes.io/</code> and its sub-namespaces (like <code class=\"language-plaintext highlighter-rouge\">sub.ns.kubernetes.io/</code>) cannot\ngenerally be used</li>\n <li>the only exception is <code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/</code> and its sub-namespaces\n(like <code class=\"language-plaintext highlighter-rouge\">sub.ns.feature.node.kubernetes.io</code>)</li>\n <li>unprefixed keys (like <code class=\"language-plaintext highlighter-rouge\">foo</code>) keys are disallowed</li>\n</ul>\n\n<h2 id=\"local-feature-source\">Local feature source</h2>\n\n<p>NFD-Worker has a special feature source named <code class=\"language-plaintext highlighter-rouge\">local</code> which is an integration\npoint for external feature detectors. It provides a mechanism for pluggable\nextensions, allowing the creation of new user-specific features and even\noverriding built-in labels.</p>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">local</code> feature source has two methods for detecting features, hooks and\nfeature files. The features discovered by the <code class=\"language-plaintext highlighter-rouge\">local</code> source can further be\nused in label rules specified in\n<a href=\"#nodefeaturerule-custom-resource\"><code class=\"language-plaintext highlighter-rouge\">NodeFeatureRule</code></a> objects and the\n<a href=\"#custom-feature-source\"><code class=\"language-plaintext highlighter-rouge\">custom</code></a> feature source.</p>\n\n<p><strong>NOTE:</strong> Be careful when creating and/or updating hook or feature files while\nNFD is running. In order to avoid race conditions you should write into a\ntemporary file (outside the <code class=\"language-plaintext highlighter-rouge\">source.d</code> and <code class=\"language-plaintext highlighter-rouge\">features.d</code> directories), and,\natomically create/update the original file by doing a filesystem move\noperation.</p>\n\n<h3 id=\"a-hook-example\">A hook example</h3>\n\n<p>Consider a shell script\n<code class=\"language-plaintext highlighter-rouge\">/etc/kubernetes/node-feature-discovery/source.d/my-hook.sh</code> having the\nfollowing stdout output, or alternatively, a plaintext file\n<code class=\"language-plaintext highlighter-rouge\">/etc/kubernetes/node-feature-discovery/features.d/my-features</code> having the\nfollowing contents:</p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>my-feature.1\nmy-feature.2=myvalue\nmy.namespace/my-feature.3=456\n</code></pre> </div></div>\n\n<p>This will translate into the following node labels:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"s\">feature.node.kubernetes.io/my-feature.1</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">true\"</span>\n<span class=\"s\">feature.node.kubernetes.io/my-feature.2</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">myvalue\"</span>\n<span class=\"s\">my.namespace/my-feature.3</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">456\"</span>\n</code></pre> </div></div>\n\n<h3 id=\"hooks\">Hooks</h3>\n\n<p><strong>DEPRECATED</strong> The <code class=\"language-plaintext highlighter-rouge\">local</code> source executes hooks found in\n<code class=\"language-plaintext highlighter-rouge\">/etc/kubernetes/node-feature-discovery/source.d/</code>. The hook files must be\nexecutable and they are supposed to print all discovered features in <code class=\"language-plaintext highlighter-rouge\">stdout</code>.\nSince NFD v0.13 the default container image only supports statically linked ELF\nbinaries.</p>\n\n<p><code class=\"language-plaintext highlighter-rouge\">stderr</code> output of hooks is propagated to NFD log so it can be used for\ndebugging and logging.</p>\n\n<p>NFD tries to execute any regular files found from the hooks directory.\nAny additional data files the hook might need (e.g. a configuration file)\nshould be placed in a separate directory in order to avoid NFD unnecessarily\ntrying to execute them. A subdirectory under the hooks directory can be used,\nfor example <code class=\"language-plaintext highlighter-rouge\">/etc/kubernetes/node-feature-discovery/source.d/conf/</code>.</p>\n\n<p><strong>NOTE:</strong> Hooks are being DEPRECATED and will be removed in a future release.\nFor backward compatibility, currently hooks are enabled by default and can be\ndisabled via <code class=\"language-plaintext highlighter-rouge\">sources.local.hooksEnabled</code> field in the worker configuration.</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">sources</span><span class=\"pi\">:</span>\n <span class=\"na\">local</span><span class=\"pi\">:</span>\n <span class=\"na\">hooksEnabled</span><span class=\"pi\">:</span> <span class=\"no\">true</span> <span class=\"c1\"># true by default at this point</span>\n</code></pre> </div></div>\n\n<p><strong>NOTE:</strong> NFD will blindly run any executables placed/mounted in the hooks\ndirectory. It is the user’s responsibility to review the hooks for e.g.\npossible security implications.</p>\n\n<p><strong>NOTE:</strong> The <a href=\"/node-feature-discovery/v0.13/deployment/image-variants.html#full\">full</a> image variant\nprovides backwards-compatibility with older NFD versions by including a more\nexpanded environment, supporting bash and perl runtimes.</p>\n\n<h3 id=\"feature-files\">Feature files</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">local</code> source reads files found in\n<code class=\"language-plaintext highlighter-rouge\">/etc/kubernetes/node-feature-discovery/features.d/</code>.</p>\n\n<h3 id=\"input-format\">Input format</h3>\n\n<p>The hook stdout and feature files are expected to contain features in simple\nkey-value pairs, separated by newlines:</p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><name>[=<value>]\n</code></pre> </div></div>\n\n<p>The label value defaults to <code class=\"language-plaintext highlighter-rouge\">true</code>, if not specified.</p>\n\n<p>Label namespace may be specified with <code class=\"language-plaintext highlighter-rouge\"><namespace>/<name>[=<value>]</code>.</p>\n\n<h3 id=\"mounts\">Mounts</h3>\n\n<p>The standard NFD deployments contain <code class=\"language-plaintext highlighter-rouge\">hostPath</code> mounts for\n<code class=\"language-plaintext highlighter-rouge\">/etc/kubernetes/node-feature-discovery/source.d/</code> and\n<code class=\"language-plaintext highlighter-rouge\">/etc/kubernetes/node-feature-discovery/features.d/</code>, making these directories\nfrom the host available inside the nfd-worker container.</p>\n\n<h4 id=\"injecting-labels-from-other-pods\">Injecting labels from other pods</h4>\n\n<p>One use case for the hooks and/or feature files is detecting features in other\nPods outside NFD, e.g. in Kubernetes device plugins. By using the same\n<code class=\"language-plaintext highlighter-rouge\">hostPath</code> mounts for <code class=\"language-plaintext highlighter-rouge\">/etc/kubernetes/node-feature-discovery/source.d/</code> and\n<code class=\"language-plaintext highlighter-rouge\">/etc/kubernetes/node-feature-discovery/features.d/</code> in the side-car (e.g.\ndevice plugin) creates a shared area for deploying hooks and feature files to\nNFD. NFD will periodically scan the directories and run any hooks and read any\nfeature files it finds.</p>\n\n<h2 id=\"custom-feature-source\">Custom feature source</h2>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">custom</code> feature source in nfd-worker provides a rule-based mechanism for\nlabel creation, similar to the\n<a href=\"#nodefeaturerule-custom-resource\"><code class=\"language-plaintext highlighter-rouge\">NodeFeatureRule</code></a> objects. The difference is\nthat the rules are specified in the worker configuration instead of a\nKubernetes API object.</p>\n\n<p>See <a href=\"/node-feature-discovery/v0.13/usage/nfd-worker.html#worker-configuration\">worker configuration</a>\nfor instructions how to set-up and manage the worker configuration.</p>\n\n<h3 id=\"an-example-custom-feature-source-configuration\">An example custom feature source configuration</h3>\n\n<p>Consider the following referential configuration for nfd-worker:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">core</span><span class=\"pi\">:</span>\n <span class=\"na\">labelSources</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">custom\"</span><span class=\"pi\">]</span>\n<span class=\"na\">sources</span><span class=\"pi\">:</span>\n <span class=\"na\">custom</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">my</span><span class=\"nv\"> </span><span class=\"s\">sample</span><span class=\"nv\"> </span><span class=\"s\">rule\"</span>\n <span class=\"na\">labels</span><span class=\"pi\">:</span>\n <span class=\"s2\">\"</span><span class=\"s\">my-sample-feature\"</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">true\"</span>\n <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">kernel.loadedmodule</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">dummy</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">Exists</span><span class=\"pi\">}</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">kernel.config</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">X86</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">In</span><span class=\"pi\">,</span> <span class=\"nv\">value</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">y\"</span><span class=\"pi\">]}</span>\n</code></pre> </div></div>\n\n<p>It specifies one rule which creates node label\n<code class=\"language-plaintext highlighter-rouge\">feature.node.kubenernetes.io/my-sample-feature=true</code> if both of the following\nconditions are true (<code class=\"language-plaintext highlighter-rouge\">matchFeatures</code> implements a logical AND over the\nmatchers):</p>\n\n<ul>\n <li>The <code class=\"language-plaintext highlighter-rouge\">dummy</code> network driver module has been loaded</li>\n <li>X86 option in kernel config is set to <code class=\"language-plaintext highlighter-rouge\">=y</code></li>\n</ul>\n\n<p>In addition, the configuration only enables the <code class=\"language-plaintext highlighter-rouge\">custom</code> source, disabling all\nbuilt-in labels.</p>\n\n<p>Now, on X86 platforms the feature label appears after doing <code class=\"language-plaintext highlighter-rouge\">modprobe dummy</code> on\na system and correspondingly the label is removed after <code class=\"language-plaintext highlighter-rouge\">rmmod dummy</code>. Note a\nre-labeling delay up to the sleep-interval of nfd-worker (1 minute by default).</p>\n\n<h3 id=\"additional-configuration-directory\">Additional configuration directory</h3>\n\n<p>In addition to the rules defined in the nfd-worker configuration file, the\n<code class=\"language-plaintext highlighter-rouge\">custom</code> feature source can read more configuration files located in the\n<code class=\"language-plaintext highlighter-rouge\">/etc/kubernetes/node-feature-discovery/custom.d/</code> directory. This makes more\ndynamic and flexible configuration easier.</p>\n\n<p>As an example, consider having file\n<code class=\"language-plaintext highlighter-rouge\">/etc/kubernetes/node-feature-discovery/custom.d/my-rule.yaml</code> with the\nfollowing content:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">my</span><span class=\"nv\"> </span><span class=\"s\">e1000</span><span class=\"nv\"> </span><span class=\"s\">rule\"</span>\n <span class=\"na\">labels</span><span class=\"pi\">:</span>\n <span class=\"s2\">\"</span><span class=\"s\">e1000.present\"</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">true\"</span>\n <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">kernel.loadedmodule</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">e1000</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">Exists</span><span class=\"pi\">}</span>\n</code></pre> </div></div>\n\n<p>This simple rule will create <code class=\"language-plaintext highlighter-rouge\">feature.node.kubenernetes.io/e1000.present=true</code>\nlabel if the <code class=\"language-plaintext highlighter-rouge\">e1000</code> kernel module has been loaded.</p>\n\n<p>The\n<a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.13.6/deployment/overlays/samples/custom-rules\"><code class=\"language-plaintext highlighter-rouge\">samples/custom-rules</code></a>\nkustomize overlay sample contains an example for deploying a custom rule from a\nConfigMap.</p>\n\n<h2 id=\"node-labels\">Node labels</h2>\n\n<p>Feature labels have the following format:</p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><namespace>/<name> = <value>\n</code></pre> </div></div>\n\n<p>The namespace part (i.e. prefix) of the labels is controlled by nfd:</p>\n\n<ul>\n <li>All built-in labels use <code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io</code>. This is also\nthe default for user defined features that don’t specify any namespace.</li>\n <li>Namespaces may be excluded with the\n<a href=\"/node-feature-discovery/v0.13/reference/master-commandline-reference.html#-deny-label-ns\"><code class=\"language-plaintext highlighter-rouge\">-deny-label-ns</code></a>\ncommand line flag of nfd-master\n <ul>\n <li>To allow specific namespaces that were denied, you can use\n<a href=\"/node-feature-discovery/v0.13/reference/master-commandline-reference.html#-extra-label-ns\"><code class=\"language-plaintext highlighter-rouge\">-extra-label-ns</code></a>\ncommand line flag of nfd-master.\ne.g: <code class=\"language-plaintext highlighter-rouge\">nfd-master -deny-label-ns=\"*\" -extra-label-ns=example.com</code></li>\n </ul>\n </li>\n</ul>\n\n<h2 id=\"label-rule-format\">Label rule format</h2>\n\n<p>This section describes the rule format used in\n<a href=\"#nodefeaturerule-custom-resource\"><code class=\"language-plaintext highlighter-rouge\">NodeFeatureRule</code></a> objects and in the\nconfiguration of the <a href=\"#custom-feature-source\"><code class=\"language-plaintext highlighter-rouge\">custom</code></a> feature source.</p>\n\n<p>It is based on a generic feature matcher that covers all features discovered by\nnfd-worker. The rules rely on a unified data model of the available features\nand a generic expression-based format. Features that can be used in the rules\nare described in detail in <a href=\"#available-features\">available features</a> below.</p>\n\n<p>Take this rule as a referential example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">my</span><span class=\"nv\"> </span><span class=\"s\">feature</span><span class=\"nv\"> </span><span class=\"s\">rule\"</span>\n <span class=\"na\">labels</span><span class=\"pi\">:</span>\n <span class=\"s2\">\"</span><span class=\"s\">my-special-feature\"</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">my-value\"</span>\n <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">cpu.cpuid</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">AVX512F</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">Exists</span><span class=\"pi\">}</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">kernel.version</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">major</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">In</span><span class=\"pi\">,</span> <span class=\"nv\">value</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">5\"</span><span class=\"pi\">]}</span>\n <span class=\"na\">minor</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">Gt</span><span class=\"pi\">,</span> <span class=\"nv\">value</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">1\"</span><span class=\"pi\">]}</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">pci.device</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">vendor</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">In</span><span class=\"pi\">,</span> <span class=\"nv\">value</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">8086\"</span><span class=\"pi\">]}</span>\n <span class=\"na\">class</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">In</span><span class=\"pi\">,</span> <span class=\"nv\">value</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">0200\"</span><span class=\"pi\">]}</span>\n</code></pre> </div></div>\n\n<p>This will yield <code class=\"language-plaintext highlighter-rouge\">feature.node.kubenernetes.io/my-special-feature=my-value</code> node\nlabel if all of these are true (<code class=\"language-plaintext highlighter-rouge\">matchFeatures</code> implements a logical AND over\nthe matchers):</p>\n\n<ul>\n <li>the CPU has AVX512F capability</li>\n <li>kernel version is 5.2 or later (must be v5.x)</li>\n <li>an Intel network controller is present</li>\n</ul>\n\n<h3 id=\"fields\">Fields</h3>\n\n<h4 id=\"name\">Name</h4>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">.name</code> field is required and used as an identifier of the rule.</p>\n\n<h4 id=\"labels\">Labels</h4>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">.labels</code> is a map of the node labels to create if the rule matches.</p>\n\n<h4 id=\"labels-template\">Labels template</h4>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">.labelsTemplate</code> field specifies a text template for dynamically creating\nlabels based on the matched features. See <a href=\"#templating\">templating</a> for\ndetails.</p>\n\n<p><strong>NOTE</strong> The <code class=\"language-plaintext highlighter-rouge\">labels</code> field has priority over <code class=\"language-plaintext highlighter-rouge\">labelsTemplate</code>, i.e.\nlabels specified in the <code class=\"language-plaintext highlighter-rouge\">labels</code> field will override anything\noriginating from <code class=\"language-plaintext highlighter-rouge\">labelsTemplate</code>.</p>\n\n<h4 id=\"taints\">Taints</h4>\n\n<p><em>taints</em> is a list of taint entries and each entry can have <code class=\"language-plaintext highlighter-rouge\">key</code>, <code class=\"language-plaintext highlighter-rouge\">value</code> and <code class=\"language-plaintext highlighter-rouge\">effect</code>,\nwhere the <code class=\"language-plaintext highlighter-rouge\">value</code> is optional. Effect could be <code class=\"language-plaintext highlighter-rouge\">NoSchedule</code>, <code class=\"language-plaintext highlighter-rouge\">PreferNoSchedule</code>\nor <code class=\"language-plaintext highlighter-rouge\">NoExecute</code>. To learn more about the meaning of these effects, check out k8s <a href=\"https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/\">documentation</a>.</p>\n\n<p><strong>NOTE</strong> taints field is not available for the custom rules of nfd-worker and only\nfor NodeFeatureRule objects.</p>\n\n<h4 id=\"vars\">Vars</h4>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">.vars</code> field is a map of values (key-value pairs) to store for subsequent\nrules to use. In other words, these are variables that are not advertised as\nnode labels. See <a href=\"#backreferences\">backreferences</a> for more details on the\nusage of vars.</p>\n\n<h4 id=\"extended-resources\">Extended resources</h4>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">.extendedResources</code> field is a list of extended resources to advertise.\nSee <a href=\"#extended-resources\">extended resources</a> for more details.</p>\n\n<p>Take this rule as a referential example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">apiVersion</span><span class=\"pi\">:</span> <span class=\"s\">nfd.k8s-sigs.io/v1alpha1</span>\n<span class=\"na\">kind</span><span class=\"pi\">:</span> <span class=\"s\">NodeFeatureRule</span>\n<span class=\"na\">metadata</span><span class=\"pi\">:</span>\n <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s\">my-extended-resource-rule</span>\n<span class=\"na\">spec</span><span class=\"pi\">:</span>\n <span class=\"na\">rules</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">my</span><span class=\"nv\"> </span><span class=\"s\">extended</span><span class=\"nv\"> </span><span class=\"s\">resource</span><span class=\"nv\"> </span><span class=\"s\">rule\"</span>\n <span class=\"na\">extendedResources</span><span class=\"pi\">:</span>\n <span class=\"s\">vendor.io/dynamic</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">@kernel.version.major\"</span>\n <span class=\"s\">vendor.io/static</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">123\"</span>\n <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">kernel.version</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">major</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">Exists</span><span class=\"pi\">}</span>\n</code></pre> </div></div>\n\n<p>The extended resource <code class=\"language-plaintext highlighter-rouge\">vendor.io/dynamic</code> is defined in the form <code class=\"language-plaintext highlighter-rouge\">@feature.attribute</code>.\nThe value of the extended resource will be the value of the attribute <code class=\"language-plaintext highlighter-rouge\">major</code>\nof the feature <code class=\"language-plaintext highlighter-rouge\">kernel.version</code>.</p>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">@<feature-name>.<element-name></code> format can be used to inject values of\ndetected features to the extended resource. See\n<a href=\"#available-features\">available features</a> for possible values to use. Note that\nthe value must be eligible as a\nKubernetes resource quantity.</p>\n\n<p>This will yield into the following node status:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> <span class=\"na\">allocatable</span><span class=\"pi\">:</span>\n <span class=\"s\">...</span>\n <span class=\"s\">vendor.io/dynamic</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">5\"</span>\n <span class=\"s\">vendor.io/static</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">123\"</span>\n <span class=\"s\">...</span>\n <span class=\"na\">capacity</span><span class=\"pi\">:</span>\n <span class=\"s\">...</span>\n <span class=\"s\">vendor.io/dynamic</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">5\"</span>\n <span class=\"s\">vendor.io/static</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">123\"</span>\n <span class=\"s\">...</span>\n</code></pre> </div></div>\n\n<p>There are some limitations to the namespace part (i.e. prefix)/ of the Extended\nResources names:</p>\n\n<ul>\n <li><code class=\"language-plaintext highlighter-rouge\">kubernetes.io/</code> and its sub-namespaces (like <code class=\"language-plaintext highlighter-rouge\">sub.ns.kubernetes.io/</code>) cannot\ngenerally be used</li>\n <li>the only exception is <code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/</code> and its sub-namespaces\n(like <code class=\"language-plaintext highlighter-rouge\">sub.ns.feature.node.kubernetes.io</code>)</li>\n <li>unprefixed names will get prefixed with <code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/</code>\nautomatically (e.g. <code class=\"language-plaintext highlighter-rouge\">foo</code> becomes <code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/foo</code>)</li>\n</ul>\n\n<h4 id=\"vars-template\">Vars template</h4>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">.varsTemplate</code> field specifies a text template for dynamically creating\nvars based on the matched features. See <a href=\"#templating\">templating</a> for details\non using templates and <a href=\"#backreferences\">backreferences</a> for more details on\nthe usage of vars.</p>\n\n<p><strong>NOTE</strong> The <code class=\"language-plaintext highlighter-rouge\">vars</code> field has priority over <code class=\"language-plaintext highlighter-rouge\">varsTemplate</code>, i.e.\nvars specified in the <code class=\"language-plaintext highlighter-rouge\">vars</code> field will override anything originating from\n<code class=\"language-plaintext highlighter-rouge\">varsTemplate</code>.</p>\n\n<h4 id=\"matchfeatures\">MatchFeatures</h4>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">.matchFeatures</code> field specifies a feature matcher, consisting of a list of\nfeature matcher terms. It implements a logical AND over the terms i.e. all\nof them must match in order for the rule to trigger.</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\"><feature-name></span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"s\"><key></span><span class=\"pi\">:</span>\n <span class=\"na\">op</span><span class=\"pi\">:</span> <span class=\"s\"><op></span>\n <span class=\"na\">value</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"s\"><value-1></span>\n <span class=\"pi\">-</span> <span class=\"s\">...</span>\n</code></pre> </div></div>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">.matchFeatures[].feature</code> field specifies the feature against which to\nmatch.</p>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">.matchFeatures[].matchExpressions</code> field specifies a map of expressions\nwhich to evaluate against the elements of the feature.</p>\n\n<p>In each MatchExpression <code class=\"language-plaintext highlighter-rouge\">op</code> specifies the operator to apply. Valid values are\ndescribed below.</p>\n\n<table>\n <thead>\n <tr>\n <th>Operator</th>\n <th>Number of values</th>\n <th>Matches when</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">In</code></td>\n <td>1 or greater</td>\n <td>Input is equal to one of the values</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">NotIn</code></td>\n <td>1 or greater</td>\n <td>Input is not equal to any of the values</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">InRegexp</code></td>\n <td>1 or greater</td>\n <td>Values of the MatchExpression are treated as regexps and input matches one or more of them</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">Exists</code></td>\n <td>0</td>\n <td>The key exists</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">DoesNotExist</code></td>\n <td>0</td>\n <td>The key does not exists</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">Gt</code></td>\n <td>1</td>\n <td>Input is greater than the value. Both the input and value must be integer numbers.</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">Lt</code></td>\n <td>1</td>\n <td>Input is less than the value. Both the input and value must be integer numbers.</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">GtLt</code></td>\n <td>2</td>\n <td>Input is between two values. Both the input and value must be integer numbers.</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">IsTrue</code></td>\n <td>0</td>\n <td>Input is equal to “true”</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">IsFalse</code></td>\n <td>0</td>\n <td>Input is equal “false”</td>\n </tr>\n </tbody>\n</table>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">value</code> field of MatchExpression is a list of string arguments to the\noperator.</p>\n\n<p>The behavior of MatchExpression depends on the <a href=\"#feature-types\">feature type</a>:\nfor <em>flag</em> and <em>attribute</em> features the MatchExpression operates on the feature\nelement whose name matches the <code class=\"language-plaintext highlighter-rouge\"><key></code>. However, for <em>instance</em> features all\nMatchExpressions are evaluated against the attributes of each instance\nseparately.</p>\n\n<h4 id=\"matchany\">MatchAny</h4>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">.matchAny</code> field is a list of of <a href=\"#matchfeatures\"><code class=\"language-plaintext highlighter-rouge\">matchFeatures</code></a>\nmatchers. A logical OR is applied over the matchers, i.e. at least one of them\nmust match in order for the rule to trigger.</p>\n\n<p>Consider the following example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> <span class=\"na\">matchAny</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">kernel.loadedmodule</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">kmod-1</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">Exists</span><span class=\"pi\">}</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">pci.device</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">vendor</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">In</span><span class=\"pi\">,</span> <span class=\"nv\">value</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">0eee\"</span><span class=\"pi\">]}</span>\n <span class=\"na\">class</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">In</span><span class=\"pi\">,</span> <span class=\"nv\">value</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">0200\"</span><span class=\"pi\">]}</span>\n <span class=\"pi\">-</span> <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">kernel.loadedmodule</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">kmod-2</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">Exists</span><span class=\"pi\">}</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">pci.device</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">vendor</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">In</span><span class=\"pi\">,</span> <span class=\"nv\">value</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">0fff\"</span><span class=\"pi\">]}</span>\n <span class=\"na\">class</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">In</span><span class=\"pi\">,</span> <span class=\"nv\">value</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">0200\"</span><span class=\"pi\">]}</span>\n</code></pre> </div></div>\n\n<p>This matches if kernel module kmod-1 is loaded and a network controller from\nvendor 0eee is present, OR, if kernel module kmod-2 has been loaded and a\nnetwork controller from vendor 0fff is present (OR both of these conditions are\ntrue).</p>\n\n<h3 id=\"available-features\">Available features</h3>\n\n<p>The following features are available for matching:</p>\n\n<table>\n <thead>\n <tr>\n <th>Feature</th>\n <th><a href=\"#feature-types\">Feature type</a></th>\n <th>Elements</th>\n <th>Value type</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu.cpuid</code></strong></td>\n <td>flag</td>\n <td> </td>\n <td> </td>\n <td>Supported CPU capabilities</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\"><cpuid-flag></code></strong></td>\n <td> </td>\n <td>CPUID flag is present</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu.cstate</code></strong></td>\n <td>attribute</td>\n <td> </td>\n <td> </td>\n <td>Status of cstates in the intel_idle cpuidle driver</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">enabled</code></strong></td>\n <td>bool</td>\n <td>‘true’ if cstates are set, otherwise ‘false’. Does not exist of intel_idle driver is not active.</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu.model</code></strong></td>\n <td>attribute</td>\n <td> </td>\n <td> </td>\n <td>CPU model related attributes</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">family</code></strong></td>\n <td>int</td>\n <td>CPU family</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">vendor_id</code></strong></td>\n <td>string</td>\n <td>CPU vendor ID</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">id</code></strong></td>\n <td>int</td>\n <td>CPU model ID</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu.pstate</code></strong></td>\n <td>attribute</td>\n <td> </td>\n <td> </td>\n <td>State of the Intel pstate driver. Does not exist if the driver is not enabled.</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">status</code></strong></td>\n <td>string</td>\n <td>Status of the driver, possible values are ‘active’ and ‘passive’</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">turbo</code></strong></td>\n <td>bool</td>\n <td>‘true’ if turbo frequencies are enabled, otherwise ‘false’</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">scaling</code></strong></td>\n <td>string</td>\n <td>Active scaling_governor, possible values are ‘powersave’ or ‘performance’.</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu.rdt</code></strong></td>\n <td>attribute</td>\n <td> </td>\n <td> </td>\n <td>Intel RDT capabilities supported by the system</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\"><rdt-flag></code></strong></td>\n <td> </td>\n <td>RDT capability is supported, see <a href=\"#intel-rdt-flags\">RDT flags</a> for details</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">RDTL3CA_NUM_CLOSID</code></strong></td>\n <td>int</td>\n <td>The number or available CLOSID (Class of service ID) for Intel L3 Cache Allocation Technology</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu.security</code></strong></td>\n <td>attribute</td>\n <td> </td>\n <td> </td>\n <td>Features related to security and trusted execution environments</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">sgx.enabled</code></strong></td>\n <td>bool</td>\n <td><code class=\"language-plaintext highlighter-rouge\">true</code> if Intel SGX (Software Guard Extensions) has been enabled, otherwise does not exist</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">sgx.epc</code></strong></td>\n <td>int</td>\n <td>The total amount Intel SGX Encrypted Page Cache memory in bytes. It’s only present if <code class=\"language-plaintext highlighter-rouge\">sgx.enabled</code> is <code class=\"language-plaintext highlighter-rouge\">true</code>.</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">se.enabled</code></strong></td>\n <td>bool</td>\n <td><code class=\"language-plaintext highlighter-rouge\">true</code> if IBM Secure Execution for Linux is available and has been enabled, otherwise does not exist</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">tdx.enabled</code></strong></td>\n <td>bool</td>\n <td><code class=\"language-plaintext highlighter-rouge\">true</code> if Intel TDX (Trusted Domain Extensions) is available on the host and has been enabled, otherwise does not exist</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">tdx.total_keys</code></strong></td>\n <td>int</td>\n <td>The total amount of keys an Intel TDX (Trusted Domain Extensions) host can provide. It’s only present if <code class=\"language-plaintext highlighter-rouge\">tdx.enabled</code> is <code class=\"language-plaintext highlighter-rouge\">true</code>.</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">sev.enabled</code></strong></td>\n <td>bool</td>\n <td><code class=\"language-plaintext highlighter-rouge\">true</code> if AMD SEV (Secure Encrypted Virtualization) is available on the host and has been enabled, otherwise does not exist</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">sev.es.enabled</code></strong></td>\n <td>bool</td>\n <td><code class=\"language-plaintext highlighter-rouge\">true</code> if AMD SEV-ES (Encrypted State supported) is available on the host and has been enabled, otherwise does not exist</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">sev.snp.enabled</code></strong></td>\n <td>bool</td>\n <td><code class=\"language-plaintext highlighter-rouge\">true</code> if AMD SEV-SNP (Secure Nested Paging supported) is available on the host and has been enabled, otherwise does not exist</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu.sgx</code></strong></td>\n <td>attribute</td>\n <td> </td>\n <td> </td>\n <td><strong>DEPRECATED</strong>: replaced by <strong><code class=\"language-plaintext highlighter-rouge\">cpu.security</code></strong> feature</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">enabled</code></strong></td>\n <td>bool</td>\n <td><strong>DEPRECATED</strong>: use <strong><code class=\"language-plaintext highlighter-rouge\">sgx.enabled</code></strong> from <strong><code class=\"language-plaintext highlighter-rouge\">cpu.security</code></strong> instead</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu.sst</code></strong></td>\n <td>attribute</td>\n <td> </td>\n <td> </td>\n <td>Intel SST (Speed Select Technology) capabilities</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">bf.enabled</code></strong></td>\n <td>bool</td>\n <td><code class=\"language-plaintext highlighter-rouge\">true</code> if Intel SST-BF (Intel Speed Select Technology - Base frequency) has been enabled, otherwise does not exist</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu.se</code></strong></td>\n <td>attribute</td>\n <td> </td>\n <td> </td>\n <td><strong>DEPRECATED</strong>: replaced by <strong><code class=\"language-plaintext highlighter-rouge\">cpu.security</code></strong> feature</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">enabled</code></strong></td>\n <td>bool</td>\n <td><strong>DEPRECATED</strong>: use <strong><code class=\"language-plaintext highlighter-rouge\">se.enabled</code></strong> from <strong><code class=\"language-plaintext highlighter-rouge\">cpu.security</code></strong> instead</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu.topology</code></strong></td>\n <td>attribute</td>\n <td> </td>\n <td> </td>\n <td>CPU topology related features</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">hardware_multithreading</code></strong></td>\n <td>bool</td>\n <td>Hardware multithreading, such as Intel HTT, is enabled</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">cpu.coprocessor</code></strong></td>\n <td>attribute</td>\n <td> </td>\n <td> </td>\n <td>CPU Coprocessor related features</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">nx_gzip</code></strong></td>\n <td>bool</td>\n <td>Nest Accelerator GZIP support is enabled</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">kernel.config</code></strong></td>\n <td>attribute</td>\n <td> </td>\n <td> </td>\n <td>Kernel configuration options</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\"><config-flag></code></strong></td>\n <td>string</td>\n <td>Value of the kconfig option</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">kernel.loadedmodule</code></strong></td>\n <td>flag</td>\n <td> </td>\n <td> </td>\n <td>Kernel modules loaded on the node as reported by <code class=\"language-plaintext highlighter-rouge\">/proc/modules</code></td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">kernel.enabledmodule</code></strong></td>\n <td>flag</td>\n <td> </td>\n <td> </td>\n <td>Kernel modules loaded on the node and available as built-ins as reported by <code class=\"language-plaintext highlighter-rouge\">modules.builtin</code></td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">mod-name</code></strong></td>\n <td> </td>\n <td>Kernel module <code class=\"language-plaintext highlighter-rouge\"><mod-name></code> is loaded</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">kernel.selinux</code></strong></td>\n <td>attribute</td>\n <td> </td>\n <td> </td>\n <td>Kernel SELinux related features</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">enabled</code></strong></td>\n <td>bool</td>\n <td><code class=\"language-plaintext highlighter-rouge\">true</code> if SELinux has been enabled and is in enforcing mode, otherwise <code class=\"language-plaintext highlighter-rouge\">false</code></td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">kernel.version</code></strong></td>\n <td>attribute</td>\n <td> </td>\n <td> </td>\n <td>Kernel version information</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">full</code></strong></td>\n <td>string</td>\n <td>Full kernel version (e.g. ‘4.5.6-7-g123abcde’)</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">major</code></strong></td>\n <td>int</td>\n <td>First component of the kernel version (e.g. ‘4’)</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">minor</code></strong></td>\n <td>int</td>\n <td>Second component of the kernel version (e.g. ‘5’)</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">revision</code></strong></td>\n <td>int</td>\n <td>Third component of the kernel version (e.g. ‘6’)</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">local.label</code></strong></td>\n <td>attribute</td>\n <td> </td>\n <td> </td>\n <td>Features from hooks and feature files, i.e. labels from the <a href=\"#local-feature-source\"><em>local</em> feature source</a></td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\"><label-name></code></strong></td>\n <td>string</td>\n <td>Label <code class=\"language-plaintext highlighter-rouge\"><label-name></code> created by the local feature source, value equals the value of the label</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">memory.nv</code></strong></td>\n <td>instance</td>\n <td> </td>\n <td> </td>\n <td>NVDIMM devices present in the system</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\"><sysfs-attribute></code></strong></td>\n <td>string</td>\n <td>Value of the sysfs device attribute, available attributes: <code class=\"language-plaintext highlighter-rouge\">devtype</code>, <code class=\"language-plaintext highlighter-rouge\">mode</code></td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">memory.numa</code></strong></td>\n <td>attribute</td>\n <td> </td>\n <td> </td>\n <td>NUMA nodes</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">is_numa</code></strong></td>\n <td>bool</td>\n <td><code class=\"language-plaintext highlighter-rouge\">true</code> if NUMA architecture, <code class=\"language-plaintext highlighter-rouge\">false</code> otherwise</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">node_count</code></strong></td>\n <td>int</td>\n <td>Number of NUMA nodes</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">network.device</code></strong></td>\n <td>instance</td>\n <td> </td>\n <td> </td>\n <td>Physical (non-virtual) network interfaces present in the system</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">name</code></strong></td>\n <td>string</td>\n <td>Name of the network interface</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\"><sysfs-attribute></code></strong></td>\n <td>string</td>\n <td>Sysfs network interface attribute, available attributes: <code class=\"language-plaintext highlighter-rouge\">operstate</code>, <code class=\"language-plaintext highlighter-rouge\">speed</code>, <code class=\"language-plaintext highlighter-rouge\">sriov_numvfs</code>, <code class=\"language-plaintext highlighter-rouge\">sriov_totalvfs</code></td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">pci.device</code></strong></td>\n <td>instance</td>\n <td> </td>\n <td> </td>\n <td>PCI devices present in the system</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\"><sysfs-attribute></code></strong></td>\n <td>string</td>\n <td>Value of the sysfs device attribute, available attributes: <code class=\"language-plaintext highlighter-rouge\">class</code>, <code class=\"language-plaintext highlighter-rouge\">vendor</code>, <code class=\"language-plaintext highlighter-rouge\">device</code>, <code class=\"language-plaintext highlighter-rouge\">subsystem_vendor</code>, <code class=\"language-plaintext highlighter-rouge\">subsystem_device</code>, <code class=\"language-plaintext highlighter-rouge\">sriov_totalvfs</code>, <code class=\"language-plaintext highlighter-rouge\">iommu_group/type</code>, <code class=\"language-plaintext highlighter-rouge\">iommu/intel-iommu/version</code></td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">storage.device</code></strong></td>\n <td>instance</td>\n <td> </td>\n <td> </td>\n <td>Block storage devices present in the system</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">name</code></strong></td>\n <td>string</td>\n <td>Name of the block device</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\"><sysfs-attribute></code></strong></td>\n <td>string</td>\n <td>Sysfs network interface attribute, available attributes: <code class=\"language-plaintext highlighter-rouge\">dax</code>, <code class=\"language-plaintext highlighter-rouge\">rotational</code>, <code class=\"language-plaintext highlighter-rouge\">nr_zones</code>, <code class=\"language-plaintext highlighter-rouge\">zoned</code></td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">system.osrelease</code></strong></td>\n <td>attribute</td>\n <td> </td>\n <td> </td>\n <td>System identification data from <code class=\"language-plaintext highlighter-rouge\">/etc/os-release</code></td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\"><parameter></code></strong></td>\n <td>string</td>\n <td>One parameter from <code class=\"language-plaintext highlighter-rouge\">/etc/os-release</code></td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">system.name</code></strong></td>\n <td>attribute</td>\n <td> </td>\n <td> </td>\n <td>System name information</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">nodename</code></strong></td>\n <td>string</td>\n <td>Name of the kubernetes node object</td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">usb.device</code></strong></td>\n <td>instance</td>\n <td> </td>\n <td> </td>\n <td>USB devices present in the system</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\"><sysfs-attribute></code></strong></td>\n <td>string</td>\n <td>Value of the sysfs device attribute, available attributes: <code class=\"language-plaintext highlighter-rouge\">class</code>, <code class=\"language-plaintext highlighter-rouge\">vendor</code>, <code class=\"language-plaintext highlighter-rouge\">device</code>, <code class=\"language-plaintext highlighter-rouge\">serial</code></td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">rule.matched</code></strong></td>\n <td>attribute</td>\n <td> </td>\n <td> </td>\n <td>Previously matched rules</td>\n </tr>\n <tr>\n <td> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\"><label-or-var></code></strong></td>\n <td>string</td>\n <td>Label or var from a preceding rule that matched</td>\n </tr>\n </tbody>\n</table>\n\n<h4 id=\"intel-rdt-flags\">Intel RDT flags</h4>\n\n<table>\n <thead>\n <tr>\n <th>Flag</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>RDTMON</td>\n <td>Intel RDT Monitoring Technology</td>\n </tr>\n <tr>\n <td>RDTCMT</td>\n <td>Intel Cache Monitoring (CMT)</td>\n </tr>\n <tr>\n <td>RDTMBM</td>\n <td>Intel Memory Bandwidth Monitoring (MBM)</td>\n </tr>\n <tr>\n <td>RDTL3CA</td>\n <td>Intel L3 Cache Allocation Technology</td>\n </tr>\n <tr>\n <td>RDTl2CA</td>\n <td>Intel L2 Cache Allocation Technology</td>\n </tr>\n <tr>\n <td>RDTMBA</td>\n <td>Intel Memory Bandwidth Allocation (MBA) Technology</td>\n </tr>\n </tbody>\n</table>\n\n<h3 id=\"templating\">Templating</h3>\n\n<p>Rules support template-based creation of labels and vars with the\n<code class=\"language-plaintext highlighter-rouge\">.labelsTemplate</code> and <code class=\"language-plaintext highlighter-rouge\">.varsTemplate</code> fields. These makes it possible to\ndynamically generate labels and vars based on the features that matched.</p>\n\n<p>The template must expand into a simple format with <code class=\"language-plaintext highlighter-rouge\"><key>=<value></code> pairs\nseparated by newline.</p>\n\n<p>Consider the following example:\n<!-- --></p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> <span class=\"na\">labelsTemplate</span><span class=\"pi\">:</span> <span class=\"pi\">|</span>\n <span class=\"s\">{{ range .pci.device }}vendor-{{ .class }}-{{ .device }}.present=true</span>\n <span class=\"s\">{{ end }}</span>\n <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">pci.device</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">class</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">InRegexp</span><span class=\"pi\">,</span> <span class=\"nv\">value</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">^02\"</span><span class=\"pi\">]}</span>\n <span class=\"na\">vendor</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">0fff\"</span><span class=\"pi\">]</span>\n</code></pre> </div></div>\n\n<!-- -->\n<p>The rule above will create individual labels\n<code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/vendor-<class-id>-<device-id>.present=true</code> for\neach network controller device (device class starting with 02) from vendor\n0ffff.</p>\n\n<p>All the matched features of each feature matcher term under <code class=\"language-plaintext highlighter-rouge\">matchFeatures</code>\nfields are available for the template engine. Matched features can be\nreferenced with <code class=\"language-plaintext highlighter-rouge\">{{ .<feature-name> }}</code> in the template, and\nthe available data could be described in yaml as follows:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"s\">.</span>\n <span class=\"s\"><key-feature></span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">Name</span><span class=\"pi\">:</span> <span class=\"s\"><matched-key></span>\n <span class=\"pi\">-</span> <span class=\"s\">...</span>\n\n <span class=\"s\"><value-feature></span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">Name</span><span class=\"pi\">:</span> <span class=\"s\"><matched-key></span>\n <span class=\"na\">Value</span><span class=\"pi\">:</span> <span class=\"s\"><matched-value></span>\n <span class=\"pi\">-</span> <span class=\"s\">...</span>\n\n <span class=\"s\"><instance-feature></span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"s\"><attribute-1-name></span><span class=\"pi\">:</span> <span class=\"s\"><attribute-1-value></span>\n <span class=\"s\"><attribute-2-name></span><span class=\"pi\">:</span> <span class=\"s\"><attribute-2-value></span>\n <span class=\"s\">...</span>\n <span class=\"pi\">-</span> <span class=\"s\">...</span>\n</code></pre> </div></div>\n\n<p>That is, the per-feature data is a list of objects whose data fields depend on\nthe type of the feature:</p>\n\n<ul>\n <li>for <em>flag</em> features only ‘Name’ is available</li>\n <li>for <em>value</em> features ‘Name’ and ‘Value’ are available</li>\n <li>for <em>instance</em> features all attributes of the matched instance are available</li>\n</ul>\n\n<p>A simple example of a template utilizing name and value from an <em>attribute</em>\nfeature:\n<!-- --></p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> <span class=\"na\">labelsTemplate</span><span class=\"pi\">:</span> <span class=\"pi\">|</span>\n <span class=\"s\">{{ range .system.osrelease }}system-{{ .Name }}={{ .Value }}</span>\n <span class=\"s\">{{ end }}</span>\n <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">system.osRelease</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">ID</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">Exists</span><span class=\"pi\">}</span>\n <span class=\"s\">VERSION_ID.major</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">Exists</span><span class=\"pi\">}</span>\n</code></pre> </div></div>\n\n<!-- -->\n<p><strong>NOTE</strong> In case of matchAny is specified, the template is executed separately\nagainst each individual <code class=\"language-plaintext highlighter-rouge\">matchFeatures</code> field and the final set of labels will\nbe superset of all these separate template expansions. E.g. consider the\nfollowing:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s\"><name></span>\n <span class=\"na\">labelsTemplate</span><span class=\"pi\">:</span> <span class=\"s\"><template></span>\n <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span> <span class=\"s\"><matcher#1></span>\n <span class=\"na\">matchAny</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span> <span class=\"s\"><matcher#2></span>\n <span class=\"pi\">-</span> <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span> <span class=\"s\"><matcher#3></span>\n</code></pre> </div></div>\n\n<p>In the example above (assuming the overall result is a match) the template\nwould be executed on matcher#1 as well as on matcher#2 and/or matcher#3\n(depending on whether both or only one of them match). All the labels from\nthese separate expansions would be created, i.e. the end result would be a\nunion of all the individual expansions.</p>\n\n<p>Rule templates use the Golang <a href=\"https://pkg.go.dev/text/template\">text/template</a>\npackage and all its built-in functionality (e.g. pipelines and functions) can\nbe used. An example template taking use of the built-in <code class=\"language-plaintext highlighter-rouge\">len</code> function,\nadvertising the number of PCI network controllers from a specific vendor:\n<!-- --></p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> <span class=\"na\">labelsTemplate</span><span class=\"pi\">:</span> <span class=\"pi\">|</span>\n <span class=\"s\">num-intel-network-controllers={{ .pci.device | len }}</span>\n <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">pci.device</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">vendor</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">In</span><span class=\"pi\">,</span> <span class=\"nv\">value</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">8086\"</span><span class=\"pi\">]}</span>\n <span class=\"na\">class</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">In</span><span class=\"pi\">,</span> <span class=\"nv\">value</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">0200\"</span><span class=\"pi\">]}</span>\n\n</code></pre> </div></div>\n\n<!-- -->\n<p>Imaginative template pipelines are possible, but care must be taken in order to\nproduce understandable and maintainable rule sets.</p>\n\n<h3 id=\"backreferences\">Backreferences</h3>\n\n<p>Rules support referencing the output of preceding rules. This enables\nsophisticated scenarios where multiple rules are combined together\nto for more complex heuristics than a single rule can provide. The labels and\nvars created by the execution of preceding rules are available as a special\n<code class=\"language-plaintext highlighter-rouge\">rule.matched</code> feature.</p>\n\n<p>Consider the following configuration:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">my</span><span class=\"nv\"> </span><span class=\"s\">kernel</span><span class=\"nv\"> </span><span class=\"s\">label</span><span class=\"nv\"> </span><span class=\"s\">rule\"</span>\n <span class=\"na\">labels</span><span class=\"pi\">:</span>\n <span class=\"na\">kernel-feature</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">true\"</span>\n <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">kernel.version</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">major</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">Gt</span><span class=\"pi\">,</span> <span class=\"nv\">value</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">4\"</span><span class=\"pi\">]}</span>\n\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">my</span><span class=\"nv\"> </span><span class=\"s\">var</span><span class=\"nv\"> </span><span class=\"s\">rule\"</span>\n <span class=\"na\">vars</span><span class=\"pi\">:</span>\n <span class=\"na\">nolabel-feature</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">true\"</span>\n <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">cpu.cpuid</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">AVX512F</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">Exists</span><span class=\"pi\">}</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">pci.device</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">vendor</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">In</span><span class=\"pi\">,</span> <span class=\"nv\">value</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">0fff\"</span><span class=\"pi\">]}</span>\n <span class=\"na\">device</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">In</span><span class=\"pi\">,</span> <span class=\"nv\">value</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">1234\"</span><span class=\"pi\">,</span> <span class=\"s2\">\"</span><span class=\"s\">1235\"</span><span class=\"pi\">]}</span>\n\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">my</span><span class=\"nv\"> </span><span class=\"s\">high</span><span class=\"nv\"> </span><span class=\"s\">level</span><span class=\"nv\"> </span><span class=\"s\">feature</span><span class=\"nv\"> </span><span class=\"s\">rule\"</span>\n <span class=\"na\">labels</span><span class=\"pi\">:</span>\n <span class=\"na\">high-level-feature</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">true\"</span>\n <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">rule.matched</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">kernel-feature</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">IsTrue</span><span class=\"pi\">}</span>\n <span class=\"na\">nolabel-feature</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">IsTrue</span><span class=\"pi\">}</span>\n</code></pre> </div></div>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/high-level-feature = true</code> label depends on thw\ntwo previous rules.</p>\n\n<p>Note that when referencing rules across multiple\n<a href=\"#nodefeaturerule-custom-resource\"><code class=\"language-plaintext highlighter-rouge\">NodeFeatureRule</code></a> objects attention must be\npaid to the ordering. <code class=\"language-plaintext highlighter-rouge\">NodeFeatureRule</code> objects are processed in alphabetical\norder (based on their <code class=\"language-plaintext highlighter-rouge\">.metadata.name</code>).</p>\n\n<h3 id=\"examples\">Examples</h3>\n\n<p>Some more configuration examples below.</p>\n\n<p>Match certain CPUID features:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">example</span><span class=\"nv\"> </span><span class=\"s\">cpuid</span><span class=\"nv\"> </span><span class=\"s\">rule\"</span>\n <span class=\"na\">labels</span><span class=\"pi\">:</span>\n <span class=\"na\">my-special-cpu-feature</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">true\"</span>\n <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">cpu.cpuid</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">AESNI</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">Exists</span><span class=\"pi\">}</span>\n <span class=\"na\">AVX</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">Exists</span><span class=\"pi\">}</span>\n</code></pre> </div></div>\n\n<p>Require a certain loaded kernel module and OS version:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">my</span><span class=\"nv\"> </span><span class=\"s\">multi-feature</span><span class=\"nv\"> </span><span class=\"s\">rule\"</span>\n <span class=\"na\">labels</span><span class=\"pi\">:</span>\n <span class=\"na\">my-special-multi-feature</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">true\"</span>\n <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">kernel.loadedmodule</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">e1000</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">Exists</span><span class=\"pi\">}</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">system.osrelease</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">NAME</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">InRegexp</span><span class=\"pi\">,</span> <span class=\"nv\">values</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">^openSUSE\"</span><span class=\"pi\">]}</span>\n <span class=\"s\">VERSION_ID.major</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">Gt</span><span class=\"pi\">,</span> <span class=\"nv\">values</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">14\"</span><span class=\"pi\">]}</span>\n</code></pre> </div></div>\n\n<p>Require a loaded kernel module and two specific PCI devices (both of which\nmust be present):</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">my</span><span class=\"nv\"> </span><span class=\"s\">multi-device</span><span class=\"nv\"> </span><span class=\"s\">rule\"</span>\n <span class=\"na\">labels</span><span class=\"pi\">:</span>\n <span class=\"na\">my-multi-device-feature</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">true\"</span>\n <span class=\"na\">matchFeatures</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">feature</span><span class=\"pi\">:</span> <span class=\"s\">kernel.loadedmodule</span>\n <span class=\"na\">matchExpressions</span><span class=\"pi\">:</span>\n <span class=\"na\">my-driver-module</span><span class=\"pi\">:</span> <span class=\"pi\">{</span><span class=\"nv\">op</span><span class=\"pi\">:</span> <span class=\"nv\">Exists</span><span class=\"pi\">}</span>\n <span class=\"pi\">-</span> <span class=\"s\">pci.device</span><span class=\"pi\">:</span>\n <span class=\"na\">vendor</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">0fff\"</span>\n <span class=\"na\">device</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">1234\"</span>\n <span class=\"pi\">-</span> <span class=\"s\">pci.device</span><span class=\"pi\">:</span>\n <span class=\"na\">vendor</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">0fff\"</span>\n <span class=\"na\">device</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">abcd\"</span>\n</code></pre> </div></div>\n\n<h2 id=\"legacy-custom-rule-syntax\">Legacy custom rule syntax</h2>\n\n<p><strong>DEPRECATED</strong>: use the new rule syntax instead.</p>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">custom</code> source supports the legacy <code class=\"language-plaintext highlighter-rouge\">matchOn</code> rule syntax for\nbackwards-compatibility.</p>\n\n<p>To aid in making the legacy rule syntax clearer, we define a general and a per\nrule nomenclature, keeping things as consistent as possible.</p>\n\n<h3 id=\"general-nomenclature-and-definitions\">General nomenclature and definitions</h3>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>Rule :Represents a matching logic that is used to match on a feature.\nRule Input :The input a Rule is provided. This determines how a Rule performs the match operation.\nMatcher :A composition of Rules, each Matcher may be composed of at most one instance of each Rule.\n</code></pre> </div></div>\n\n<h3 id=\"custom-features-format-using-the-nomenclature-defined-above\">Custom features format (using the nomenclature defined above)</h3>\n\n<p>Rules are specified under <code class=\"language-plaintext highlighter-rouge\">sources.custom</code> in the nfd-worker configuration\nfile.</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">sources</span><span class=\"pi\">:</span>\n <span class=\"na\">custom</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s\"><feature name></span>\n <span class=\"na\">value</span><span class=\"pi\">:</span> <span class=\"s\"><optional feature value, defaults to \"true\"></span>\n <span class=\"na\">matchOn</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"s\"><Rule-1></span><span class=\"pi\">:</span> <span class=\"s\"><Rule-1 Input></span>\n <span class=\"pi\">[</span><span class=\"nv\"><Rule-2></span><span class=\"pi\">:</span> <span class=\"nv\"><Rule-2 Input></span><span class=\"pi\">]</span>\n <span class=\"pi\">-</span> <span class=\"s\"><Matcher-2></span>\n <span class=\"pi\">-</span> <span class=\"s\">...</span>\n <span class=\"pi\">-</span> <span class=\"s\">...</span>\n <span class=\"pi\">-</span> <span class=\"s\"><Matcher-N></span>\n <span class=\"pi\">-</span> <span class=\"s\"><custom feature 2></span>\n <span class=\"pi\">-</span> <span class=\"s\">...</span>\n <span class=\"pi\">-</span> <span class=\"s\">...</span>\n <span class=\"pi\">-</span> <span class=\"s\"><custom feature M></span>\n</code></pre> </div></div>\n\n<p>The label is constructed by adding <code class=\"language-plaintext highlighter-rouge\">custom-</code> prefix to the name field, label\nvalue defaults to <code class=\"language-plaintext highlighter-rouge\">true</code> if not specified in the rule spec:</p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>feature.node.kubernetes.io/custom-<name> = <value>\n</code></pre> </div></div>\n\n<h3 id=\"matching-process\">Matching process</h3>\n\n<p>Specifying Rules to match on a feature is done by providing a list of Matchers.\nEach Matcher contains one or more Rules.</p>\n\n<p>Logical <em>OR</em> is performed between Matchers and logical <em>AND</em> is performed\nbetween Rules of a given Matcher.</p>\n\n<h3 id=\"rules\">Rules</h3>\n\n<h4 id=\"pciid-rule\">pciid rule</h4>\n\n<h5 id=\"nomenclature\">Nomenclature</h5>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>Attribute :A PCI attribute.\nElement :An identifier of the PCI attribute.\n</code></pre> </div></div>\n\n<p>The PciId Rule allows matching the PCI devices in the system on the following\nAttributes: <code class=\"language-plaintext highlighter-rouge\">class</code>,<code class=\"language-plaintext highlighter-rouge\">vendor</code> and <code class=\"language-plaintext highlighter-rouge\">device</code>. A list of Elements is provided for\neach Attribute.</p>\n\n<h5 id=\"format\">Format</h5>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">pciId </span><span class=\"pi\">:</span>\n <span class=\"na\">class</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"nv\"><class id></span><span class=\"pi\">,</span> <span class=\"nv\">...</span><span class=\"pi\">]</span>\n <span class=\"na\">vendor</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"nv\"><vendor id></span><span class=\"pi\">,</span> <span class=\"nv\">...</span><span class=\"pi\">]</span>\n <span class=\"na\">device</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"nv\"><device id></span><span class=\"pi\">,</span> <span class=\"nv\">...</span><span class=\"pi\">]</span>\n</code></pre> </div></div>\n\n<p>Matching is done by performing a logical <em>OR</em> between Elements of an Attribute\nand logical <em>AND</em> between the specified Attributes for each PCI device in the\nsystem. At least one Attribute must be specified. Missing attributes will not\npartake in the matching process.</p>\n\n<h4 id=\"usbid-rule\">UsbId rule</h4>\n\n<h5 id=\"nomenclature-1\">Nomenclature</h5>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>Attribute :A USB attribute.\nElement :An identifier of the USB attribute.\n</code></pre> </div></div>\n\n<p>The UsbId Rule allows matching the USB devices in the system on the following\nAttributes: <code class=\"language-plaintext highlighter-rouge\">class</code>,<code class=\"language-plaintext highlighter-rouge\">vendor</code>, <code class=\"language-plaintext highlighter-rouge\">device</code> and <code class=\"language-plaintext highlighter-rouge\">serial</code>. A list of Elements is\nprovided for each Attribute.</p>\n\n<h5 id=\"format-1\">Format</h5>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">usbId </span><span class=\"pi\">:</span>\n <span class=\"na\">class</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"nv\"><class id></span><span class=\"pi\">,</span> <span class=\"nv\">...</span><span class=\"pi\">]</span>\n <span class=\"na\">vendor</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"nv\"><vendor id></span><span class=\"pi\">,</span> <span class=\"nv\">...</span><span class=\"pi\">]</span>\n <span class=\"na\">device</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"nv\"><device id></span><span class=\"pi\">,</span> <span class=\"nv\">...</span><span class=\"pi\">]</span>\n <span class=\"na\">serial</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"nv\"><serial></span><span class=\"pi\">,</span> <span class=\"nv\">...</span><span class=\"pi\">]</span>\n</code></pre> </div></div>\n\n<p>Matching is done by performing a logical <em>OR</em> between Elements of an Attribute\nand logical <em>AND</em> between the specified Attributes for each USB device in the\nsystem. At least one Attribute must be specified. Missing attributes will not\npartake in the matching process.</p>\n\n<h4 id=\"loadedkmod-rule\">LoadedKMod rule</h4>\n\n<h5 id=\"nomenclature-2\">Nomenclature</h5>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>Element :A kernel module\n</code></pre> </div></div>\n\n<p>The LoadedKMod Rule allows matching the loaded kernel modules in the system\nagainst a provided list of Elements.</p>\n\n<h5 id=\"format-2\">Format</h5>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">loadedKMod </span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"nv\"><kernel module></span><span class=\"pi\">,</span> <span class=\"nv\">...</span><span class=\"pi\">]</span>\n</code></pre> </div></div>\n\n<p>Matching is done by performing logical <em>AND</em> for each provided Element, i.e\nthe Rule will match if all provided Elements (kernel modules) are loaded in the\nsystem.</p>\n\n<h4 id=\"cpuid-rule\">CpuId rule</h4>\n\n<h5 id=\"nomenclature-3\">Nomenclature</h5>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>Element :A CPUID flag\n</code></pre> </div></div>\n\n<p>The Rule allows matching the available CPUID flags in the system against a\nprovided list of Elements.</p>\n\n<h5 id=\"format-3\">Format</h5>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">cpuId </span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"nv\"><CPUID flag string></span><span class=\"pi\">,</span> <span class=\"nv\">...</span><span class=\"pi\">]</span>\n</code></pre> </div></div>\n\n<p>Matching is done by performing logical <em>AND</em> for each provided Element, i.e the\nRule will match if all provided Elements (CPUID flag strings) are available in\nthe system.</p>\n\n<h4 id=\"kconfig-rule\">Kconfig rule</h4>\n\n<h5 id=\"nomenclature-4\">Nomenclature</h5>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>Element :A Kconfig option\n</code></pre> </div></div>\n\n<p>The Rule allows matching the kconfig options in the system against a provided\nlist of Elements.</p>\n\n<h5 id=\"format-4\">Format</h5>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">kConfig</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"nv\"><kernel config option ('y' or 'm') or '=<value>'></span><span class=\"pi\">,</span> <span class=\"nv\">...</span><span class=\"pi\">]</span>\n</code></pre> </div></div>\n\n<p>Matching is done by performing logical <em>AND</em> for each provided Element, i.e the\nRule will match if all provided Elements (kernel config options) are enabled\n(<code class=\"language-plaintext highlighter-rouge\">y</code> or <code class=\"language-plaintext highlighter-rouge\">m</code>) or matching <code class=\"language-plaintext highlighter-rouge\">=<value></code> in the kernel.</p>\n\n<h4 id=\"nodename-rule\">Nodename rule</h4>\n\n<h5 id=\"nomenclature-5\">Nomenclature</h5>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>Element :A nodename regexp pattern\n</code></pre> </div></div>\n\n<p>The Rule allows matching the node’s name against a provided list of Elements.</p>\n\n<h5 id=\"format-5\">Format</h5>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">nodename</span><span class=\"pi\">:</span> <span class=\"pi\">[</span> <span class=\"nv\"><nodename regexp pattern></span><span class=\"pi\">,</span> <span class=\"nv\">...</span> <span class=\"pi\">]</span>\n</code></pre> </div></div>\n\n<p>Matching is done by performing logical <em>OR</em> for each provided Element, i.e the\nRule will match if one of the provided Elements (nodename regexp pattern)\nmatches the node’s name.</p>\n\n<h3 id=\"legacy-custom-rule-example\">Legacy custom rule example</h3>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">custom</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">my.kernel.feature\"</span>\n <span class=\"na\">matchOn</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">loadedKMod</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">kmod1\"</span><span class=\"pi\">,</span> <span class=\"s2\">\"</span><span class=\"s\">kmod2\"</span><span class=\"pi\">]</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">my.pci.feature\"</span>\n <span class=\"na\">matchOn</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">pciId</span><span class=\"pi\">:</span>\n <span class=\"na\">vendor</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">15b3\"</span><span class=\"pi\">]</span>\n <span class=\"na\">device</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">1014\"</span><span class=\"pi\">,</span> <span class=\"s2\">\"</span><span class=\"s\">1017\"</span><span class=\"pi\">]</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">my.usb.feature\"</span>\n <span class=\"na\">matchOn</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">usbId</span><span class=\"pi\">:</span>\n <span class=\"na\">vendor</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">1d6b\"</span><span class=\"pi\">]</span>\n <span class=\"na\">device</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">0003\"</span><span class=\"pi\">]</span>\n <span class=\"na\">serial</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">090129a\"</span><span class=\"pi\">]</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">my.combined.feature\"</span>\n <span class=\"na\">matchOn</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">loadedKMod </span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">vendor_kmod1\"</span><span class=\"pi\">,</span> <span class=\"s2\">\"</span><span class=\"s\">vendor_kmod2\"</span><span class=\"pi\">]</span>\n <span class=\"na\">pciId</span><span class=\"pi\">:</span>\n <span class=\"na\">vendor</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">15b3\"</span><span class=\"pi\">]</span>\n <span class=\"na\">device</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">1014\"</span><span class=\"pi\">,</span> <span class=\"s2\">\"</span><span class=\"s\">1017\"</span><span class=\"pi\">]</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">vendor.feature.node.kubernetes.io/accumulated.feature\"</span>\n <span class=\"na\">matchOn</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">loadedKMod </span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">some_kmod1\"</span><span class=\"pi\">,</span> <span class=\"s2\">\"</span><span class=\"s\">some_kmod2\"</span><span class=\"pi\">]</span>\n <span class=\"pi\">-</span> <span class=\"na\">pciId</span><span class=\"pi\">:</span>\n <span class=\"na\">vendor</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">15b3\"</span><span class=\"pi\">]</span>\n <span class=\"na\">device</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">1014\"</span><span class=\"pi\">,</span> <span class=\"s2\">\"</span><span class=\"s\">1017\"</span><span class=\"pi\">]</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">my.kernel.featureneedscpu\"</span>\n <span class=\"na\">matchOn</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">kConfig</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">KVM_INTEL\"</span><span class=\"pi\">]</span>\n <span class=\"pi\">-</span> <span class=\"na\">cpuId</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">VMX\"</span><span class=\"pi\">]</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">my.kernel.modulecompiler\"</span>\n <span class=\"na\">matchOn</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">kConfig</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">GCC_VERSION=100101\"</span><span class=\"pi\">]</span>\n <span class=\"na\">loadedKMod</span><span class=\"pi\">:</span> <span class=\"pi\">[</span><span class=\"s2\">\"</span><span class=\"s\">kmod1\"</span><span class=\"pi\">]</span>\n <span class=\"pi\">-</span> <span class=\"na\">name</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">profile.node.kubernetes.io/my-datacenter\"</span>\n <span class=\"na\">value</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">datacenter-1\"</span>\n <span class=\"na\">matchOn</span><span class=\"pi\">:</span>\n <span class=\"pi\">-</span> <span class=\"na\">nodename</span><span class=\"pi\">:</span> <span class=\"pi\">[</span> <span class=\"s2\">\"</span><span class=\"s\">node-datacenter1-rack.*-server.*\"</span> <span class=\"pi\">]</span>\n</code></pre> </div></div>\n\n<p><strong>In the example above:</strong></p>\n\n<ul>\n <li>A node would contain the label:\n<code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/custom-my.kernel.feature=true</code> if the node has\n<code class=\"language-plaintext highlighter-rouge\">kmod1</code> <em>AND</em> <code class=\"language-plaintext highlighter-rouge\">kmod2</code> kernel modules loaded.</li>\n <li>A node would contain the label:\n<code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/custom-my.pci.feature=true</code> if the node contains\na PCI device with a PCI vendor ID of <code class=\"language-plaintext highlighter-rouge\">15b3</code> <em>AND</em> PCI device ID of <code class=\"language-plaintext highlighter-rouge\">1014</code> <em>OR</em>\n<code class=\"language-plaintext highlighter-rouge\">1017</code>.</li>\n <li>A node would contain the label:\n<code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/custom-my.usb.feature=true</code> if the node contains\na USB device with a USB vendor ID of <code class=\"language-plaintext highlighter-rouge\">1d6b</code> <em>AND</em> USB device ID of <code class=\"language-plaintext highlighter-rouge\">0003</code>.</li>\n <li>A node would contain the label:\n<code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/custom-my.combined.feature=true</code> if\n<code class=\"language-plaintext highlighter-rouge\">vendor_kmod1</code> <em>AND</em> <code class=\"language-plaintext highlighter-rouge\">vendor_kmod2</code> kernel modules are loaded <strong>AND</strong> the node\ncontains a PCI device\nwith a PCI vendor ID of <code class=\"language-plaintext highlighter-rouge\">15b3</code> <em>AND</em> PCI device ID of <code class=\"language-plaintext highlighter-rouge\">1014</code> <em>or</em> <code class=\"language-plaintext highlighter-rouge\">1017</code>.</li>\n <li>A node would contain the label:\n<code class=\"language-plaintext highlighter-rouge\">vendor.feature.node.kubernetes.io/accumulated.feature=true</code> if\n<code class=\"language-plaintext highlighter-rouge\">some_kmod1</code> <em>AND</em> <code class=\"language-plaintext highlighter-rouge\">some_kmod2</code> kernel modules are loaded <strong>OR</strong> the node\ncontains a PCI device\nwith a PCI vendor ID of <code class=\"language-plaintext highlighter-rouge\">15b3</code> <em>AND</em> PCI device ID of <code class=\"language-plaintext highlighter-rouge\">1014</code> <em>OR</em> <code class=\"language-plaintext highlighter-rouge\">1017</code>.</li>\n <li>A node would contain the label:\n<code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/custom-my.kernel.featureneedscpu=true</code> if\n<code class=\"language-plaintext highlighter-rouge\">KVM_INTEL</code> kernel config is enabled <strong>AND</strong> the node CPU supports <code class=\"language-plaintext highlighter-rouge\">VMX</code>\nvirtual machine extensions</li>\n <li>A node would contain the label:\n<code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/custom-my.kernel.modulecompiler=true</code> if the\nin-tree <code class=\"language-plaintext highlighter-rouge\">kmod1</code> kernel module is loaded <strong>AND</strong> it’s built with\n<code class=\"language-plaintext highlighter-rouge\">GCC_VERSION=100101</code>.</li>\n <li>A node would contain the label:\n<code class=\"language-plaintext highlighter-rouge\">profile.node.kubernetes.io/my-datacenter=datacenter-1</code> if the node’s name\nmatches the <code class=\"language-plaintext highlighter-rouge\">node-datacenter1-rack.*-server.*</code> pattern, e.g.\n<code class=\"language-plaintext highlighter-rouge\">node-datacenter1-rack2-server42</code></li>\n</ul>\n","dir":"/usage/","name":"customization-guide.md","path":"usage/customization-guide.md","url":"/usage/customization-guide.html"},{"title":"Examples and demos","layout":"default","sort":9,"content":"<h1 class=\"no_toc\" id=\"examples-and-demos\">Examples and demos</h1>\n\n<h2 class=\"no_toc text-delta\" id=\"table-of-contents\">Table of contents</h2>\n\n<ol id=\"markdown-toc\">\n <li><a href=\"#demos\" id=\"markdown-toc-demos\">Demos</a> <ol>\n <li><a href=\"#usage-demo\" id=\"markdown-toc-usage-demo\">Usage demo</a></li>\n <li><a href=\"#demo-use-case\" id=\"markdown-toc-demo-use-case\">Demo use case</a></li>\n </ol>\n </li>\n</ol>\n\n<hr />\n\n<p>This page contains usage examples and demos.</p>\n\n<h2 id=\"demos\">Demos</h2>\n\n<h3 id=\"usage-demo\">Usage demo</h3>\n\n<p><a href=\"https://asciinema.org/a/247316\"><img src=\"https://asciinema.org/a/247316.svg\" alt=\"asciicast\" /></a></p>\n\n<h3 id=\"demo-use-case\">Demo use case</h3>\n\n<p>A demo on the benefits of using node feature discovery can be found in the\nsource code repository under\n<a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/tree/v0.13.6/demo\">demo/</a>.</p>\n","dir":"/usage/","name":"examples-and-demos.md","path":"usage/examples-and-demos.md","url":"/usage/examples-and-demos.html"}] |