mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
740a589301
Auto-generated from v0.15.3-4-g08c731f6 by 'update-gh-pages.sh'
1 line
No EOL
381 KiB
JSON
1 line
No EOL
381 KiB
JSON
[{"title":"Image variants","layout":"default","sort":1,"content":"<h1 class=\"no_toc\" id=\"image-variants\">Image variants</h1>\n\n<hr />\n\n<p>NFD offers two variants of the container image. Released container images are\navailable for x86_64 and Arm64 architectures.</p>\n\n<h2 id=\"default\">Default</h2>\n\n<p>The default is a minimal image based on\n<a href=\"https://hub.docker.com/_/scratch\">scratch</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.15.4-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:bookworm-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.15.4-full</code>).</p>\n","dir":"/deployment/","name":"image-variants.md","path":"deployment/image-variants.md","url":"/deployment/image-variants.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=\"/node-feature-discovery/v0.15/get-started/introduction.html\">Introduction</a></strong> for more details on the\nproject.</p>\n </li>\n <li>\n <p><strong><a href=\"/node-feature-discovery/v0.15/get-started/quick-start.html\">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.15.4\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 <span class=\"s1\">'.items[].metadata.labels'</span>\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":"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-gc\" id=\"markdown-toc-nfd-gc\">NFD-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, annotations and node taints. Node Feature Discovery is compatible\nwith any recent version of Kubernetes (v1.21+).</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-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.15/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-gc\">NFD-GC</h2>\n\n<p>NFD-GC is a daemon responsible for cleaning obsolete\n<a href=\"/node-feature-discovery/v0.15/usage/custom-resources.html#nodefeature\">NodeFeature</a> and\n<a href=\"/node-feature-discovery/v0.15/usage/custom-resources.html#noderesourcetopology\">NodeResourceTopology</a> objects.</p>\n\n<p>One instance of nfd-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/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/feature-annotations</td>\n <td>Comma-separated list of node annotations 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 <tr>\n <td>[<instance>.]nfd.node.kubernetes.io/taints</td>\n <td>Comma-separated list of node taints managed by NFD. NFD uses this internally so must not be edited by users.</td>\n </tr>\n </tbody>\n</table>\n\n<blockquote>\n <p><strong>NOTE:</strong> the <a href=\"/node-feature-discovery/v0.15/reference/master-commandline-reference.html#instance\"><code class=\"language-plaintext highlighter-rouge\">-instance</code></a>\ncommand line flag affects the annotation names</p>\n</blockquote>\n\n<p>Unapplicable annotations are not created, i.e. for example\n<code class=\"language-plaintext highlighter-rouge\">nfd.node.kubernetes.io/extended-resources</code> is only placed if some extended\nresources were created by NFD.</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.15/usage/custom-resources.html#nodefeature\">NodeFeature</a>s\nis 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.15/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.15/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=\"#-metrics\" id=\"markdown-toc--metrics\">-metrics</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-leader-election\" id=\"markdown-toc--enable-leader-election\">-enable-leader-election</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=\"#-nfd-api-parallelism\" id=\"markdown-toc--nfd-api-parallelism\">-nfd-api-parallelism</a></li>\n <li><a href=\"#logging\" id=\"markdown-toc-logging\">Logging</a></li>\n <li><a href=\"#-resync-period\" id=\"markdown-toc--resync-period\">-resync-period</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.15.4 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=\"-metrics\">-metrics</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-metrics</code> flag specifies the port on which to expose\n<a href=\"https://prometheus.io/\">Prometheus</a> metrics. Setting this to 0 disables the\nmetrics server on nfd-master.</p>\n\n<p>Default: 8081</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\">-metrics</span><span class=\"o\">=</span>12345\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<blockquote>\n <p><strong>NOTE</strong> the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.</p>\n</blockquote>\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 for the incoming requests to be accepted.</p>\n\n<p>Default: <em>empty</em></p>\n\n<blockquote>\n <p><strong>NOTE:</strong> 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</blockquote>\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<blockquote>\n <p><strong>NOTE</strong> the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.</p>\n</blockquote>\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<blockquote>\n <p><strong>NOTE:</strong> 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</blockquote>\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<blockquote>\n <p><strong>NOTE</strong> the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.</p>\n</blockquote>\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<blockquote>\n <p><strong>NOTE:</strong> 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</blockquote>\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<blockquote>\n <p><strong>NOTE</strong> the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.</p>\n</blockquote>\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<blockquote>\n <p><strong>NOTE</strong> the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.</p>\n</blockquote>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-enable-nodefeature-api</code> flag enables/disables the\n<a href=\"/node-feature-discovery/v0.15/usage/custom-resources.html#nodefeature\">NodeFeature</a> CRD API for receiving\nfeature requests. This will also automatically disable/enable the gRPC\ninterface.</p>\n\n<p>Default: true</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><span class=\"o\">=</span><span class=\"nb\">false</span>\n</code></pre> </div></div>\n\n<h3 id=\"-enable-leader-election\">-enable-leader-election</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-enable-leader-election</code> flag enables leader election for NFD-Master.\nIt is advised to turn on this flag when running more than one instance of\nNFD-Master.</p>\n\n<p>This flag takes effect only when combined with <code class=\"language-plaintext highlighter-rouge\">-enable-nodefeature-api</code> flag.</p>\n\n<p>Default: false</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> <span class=\"nt\">-enable-leader-election</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.15/usage/custom-resources.html#nodefeature\">NodeFeature</a> and\n<a href=\"/node-feature-discovery/v0.15/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 regular\nexpression or it will not be published.</p>\n\n<blockquote>\n <p><strong>NOTE:</strong> The regular expression is only matches against the “basename” part\nof the label, i.e. to the part of the name after ‘/’. The label namespace is\nomitted.</p>\n</blockquote>\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.15/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=\"-nfd-api-parallelism\">-nfd-api-parallelism</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-nfd-api-parallelism</code> flag can be used to specify the maximum\nnumber of concurrent node updates.</p>\n\n<p>It takes effect only when <code class=\"language-plaintext highlighter-rouge\">-enable-nodefeature-api</code> has been set.</p>\n\n<p>Default: 10</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\">-nfd-api-parallelism</span><span class=\"o\">=</span>1\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\n<h3 id=\"-resync-period\">-resync-period</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-resync-period</code> flag specifies the NFD API controller resync period.\nThe resync means nfd-master replaying all NodeFeature and NodeFeatureRule objects,\nthus effectively re-syncing all nodes in the cluster (i.e. ensuring labels, annotations,\nextended resources and taints are in place).\nOnly has effect when the <a href=\"/node-feature-discovery/v0.15/usage/custom-resources.html#nodefeature\">NodeFeature</a>\nCRD API has been enabled with <a href=\"/node-feature-discovery/v0.15/reference/master-commandline-reference.html#-enable-nodefeature-api\"><code class=\"language-plaintext highlighter-rouge\">-enable-nodefeature-api</code></a>.</p>\n\n<p>Default: 1 hour.</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\">-resync-period</span><span class=\"o\">=</span>2h\n</code></pre> </div></div>\n","dir":"/reference/","name":"master-commandline-reference.md","path":"reference/master-commandline-reference.md","url":"/reference/master-commandline-reference.html"},{"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.15/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.15/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><strong>NOTE:</strong> Consecutive runs of nfd-worker will update the labels on a given\nnode. If features are not discovered on a consecutive run, the corresponding\nlabel will be removed. This includes any restrictions placed on the\nconsecutive run, such as restricting discovered features with the\n<a href=\"/node-feature-discovery/v0.15/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.15/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.15/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.tdx.protected</code></strong></td>\n <td>true</td>\n <td>Set to ‘true’ if Intel TDX was used to start the guest node, based on the existence of the “TDX_GUEST” information as part of cpuid features.</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-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><strong>NOTE:</strong> the <code class=\"language-plaintext highlighter-rouge\">cpu-rdt.<rdt-flag></code> labels are deprecated and will be removed\nin a future release. They will remain to be available as features\nfor <a href=\"/node-feature-discovery/v0.15/usage/custom-resources.html#nodefeaturerule\">NodeFeatureRule</a> to consume.\nSee <a href=\"/node-feature-discovery/v0.15/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.15/usage/nfd-worker.html#worker-configuration\">worker configuration</a> and\n<a href=\"/node-feature-discovery/v0.15/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>APX_F</td>\n <td>Intel Advanced Performance Extensions (APX)</td>\n </tr>\n <tr>\n <td>AVX10</td>\n <td>Intel Advanced Vector Extensions 10 (AVX10)</td>\n </tr>\n <tr>\n <td>AVX10_256, AVX10_512</td>\n <td>Intel AVX10 256-bit and 512-bit vector support</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>AVXIFMA</td>\n <td>AVX-IFMA instructions</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>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, SSSE3 and TDX_GUEST. See\n<a href=\"/node-feature-discovery/v0.15/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.15/usage/nfd-worker.html#worker-configuration\">worker configuration</a> and\n<a href=\"/node-feature-discovery/v0.15/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 <tr>\n <td> </td>\n <td> </td>\n <td> </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.15/reference/worker-configuration-reference.html#sourcespci\"><code class=\"language-plaintext highlighter-rouge\">sources.pci</code></a> options\nand <a href=\"/node-feature-discovery/v0.15/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.15/reference/worker-configuration-reference.html#sourcesusb\"><code class=\"language-plaintext highlighter-rouge\">sources.usb</code></a> options\nand <a href=\"/node-feature-discovery/v0.15/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 <tr>\n <td> </td>\n <td> </td>\n <td> </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=\"/node-feature-discovery/v0.15/usage/customization-guide.html\">customization guide</a> for\ndetailed documentation.</p>\n\n<h2 id=\"extended-resources\">Extended resources</h2>\n\n<p>NFD is able to create extended resources, see the\n<a href=\"/node-feature-discovery/v0.15/usage/custom-resources.html#nodefeaturerule\">NodeFeatureRule</a> CRD and its\n<a href=\"#customization-guide.md#extendedresources\">extendedResources</a> field for more\ndetails.</p>\n\n<p>Note that NFD is not a replacement for the usage of device plugins.</p>\n\n<p>An example use-case for extended resources could be based on custom feature\n(created e.g. with <a href=\"#customization-guide.md#feature-files\">feature files</a> that\nexposes the node SGX EPC memory section size. This value will then be turned\ninto an extended resource of the node, allowing PODs to request that resource\nand the Kubernetes scheduler to schedule such PODs to only those nodes which\nhave a sufficient capacity of said resource left.</p>\n\n<!-- Links -->\n","dir":"/usage/","name":"features.md","path":"usage/features.md","url":"/usage/features.html"},{"title":"Deployment","layout":"default","sort":2,"content":"<h1 id=\"deployment\">Deployment</h1>\n\n<p>Node Feature Discovery can be deployed on any recent version of Kubernetes\n(v1.21+).</p>\n\n<p>See <a href=\"/node-feature-discovery/v0.15/deployment/image-variants.html\">Image variants</a> for description of the different NFD\ncontainer images available.</p>\n\n<p><a href=\"/node-feature-discovery/v0.15/deployment/kustomize.html\">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=\"/node-feature-discovery/v0.15/deployment/helm.html\">Using Helm</a> provides easy management of NFD deployments with nice\nconfiguration management and easy upgrades.</p>\n\n<p><a href=\"/node-feature-discovery/v0.15/deployment/operator.html\">Using Operator</a> provides deployment and configuration management via\nCRDs.</p>\n","dir":"/deployment/","name":"index.md","path":"deployment/index.md","url":"/deployment/"},{"title":"Kustomize","layout":"default","sort":2,"content":"<h1 class=\"no_toc\" id=\"deployment-with-kustomize\">Deployment 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=\"#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 <li><a href=\"#metrics\" id=\"markdown-toc-metrics\">Metrics</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> can be used to\ndeploy 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.15.4\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<blockquote>\n <p><strong>NOTE:</strong> nfd-topology-updater is not deployed as part of the <code class=\"language-plaintext highlighter-rouge\">default</code>\noverlay. Refer to the <a href=\"#master-worker-topologyupdater\">Master Worker Topologyupdater</a>\nand <a href=\"#topologyupdater\">Topologyupdater</a> below.</p>\n</blockquote>\n\n<p>Alternatively you can clone the repository and customize the deployment by\ncreating your own overlays. See <a href=\"https://github.com/kubernetes-sigs/kustomize\">kustomize</a> for more information\nabout 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.15.4/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.15.4/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.15.4/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.15.4/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.15.4/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.15.4/deployment/overlays/prometheus\"><code class=\"language-plaintext highlighter-rouge\">prometheus</code></a>:\nsee <a href=\"#metrics\">Metrics</a> below</li>\n <li><a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.15.4/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.15/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.15.4/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=\"/node-feature-discovery/v0.15/deployment/tls.html\">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.15.4/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.15/usage/features.html#custom\">Custom feature source</a> for more information about\ncustom node labels</li>\n</ul>\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.15.4 | <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.15.4\n\n</code></pre> </div></div>\n\n<h3 id=\"topologyupdater\">Topologyupdater</h3>\n\n<p>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.15.4\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.15.4\nkubectl apply <span class=\"nt\">-k</span> https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/topologyupdater?ref<span class=\"o\">=</span>v0.15.4\n\n</code></pre> </div></div>\n\n<h3 id=\"metrics\">Metrics</h3>\n\n<p>To allow <a href=\"https://github.com/prometheus-operator/prometheus-operator\">prometheus operator</a>\nto scrape metrics from node-feature-discovery,\nrun the following command:</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.15.4\nkubectl apply <span class=\"nt\">-k</span> https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/prometheus?ref<span class=\"o\">=</span>v0.15.4\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.15.4\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":"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.15.4\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 <span class=\"s1\">'.items[].metadata.labels'</span>\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>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.15.4\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":"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=\"#-metrics\" id=\"markdown-toc--metrics\">-metrics</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.15.4 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<blockquote>\n <p><strong>NOTE</strong> the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.</p>\n</blockquote>\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<blockquote>\n <p><strong>NOTE</strong> the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.</p>\n</blockquote>\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<blockquote>\n <p><strong>NOTE:</strong> 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</blockquote>\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<blockquote>\n <p><strong>NOTE</strong> the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.</p>\n</blockquote>\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<blockquote>\n <p><strong>NOTE:</strong> 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</blockquote>\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<blockquote>\n <p><strong>NOTE</strong> the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.</p>\n</blockquote>\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<blockquote>\n <p><strong>NOTE:</strong> 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</blockquote>\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.15/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<blockquote>\n <p><strong>NOTE</strong> the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.</p>\n</blockquote>\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<blockquote>\n <p><strong>NOTE:</strong> This flag takes precedence over the <code class=\"language-plaintext highlighter-rouge\">core.featureSources</code>\nconfiguration file option.</p>\n</blockquote>\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<blockquote>\n <p><strong>NOTE:</strong> This flag takes precedence over the <code class=\"language-plaintext highlighter-rouge\">core.labelSources</code>\nconfiguration file option.</p>\n</blockquote>\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<blockquote>\n <p><strong>NOTE</strong> the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.</p>\n</blockquote>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-enable-nodefeature-api</code> flag enables/disables the\n<a href=\"/node-feature-discovery/v0.15/usage/custom-resources.html#nodefeature\">NodeFeature</a> CRD API\nfor communicating with nfd-master. When enabled nfd-worker creates per-node\nNodeFeature objects the contain all discovered node features and the set of\nfeature labels to be created. Setting the flag to false will enable\ngRPC communication to nfd-master.</p>\n\n<p>Default: true</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><span class=\"o\">=</span><span class=\"nb\">false</span>\n</code></pre> </div></div>\n\n<h3 id=\"-metrics\">-metrics</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-metrics</code> flag specifies the port on which to expose\n<a href=\"https://prometheus.io/\">Prometheus</a> metrics. Setting this to 0 disables the\nmetrics server on nfd-worker.</p>\n\n<p>Default: 8081</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\">-metrics</span><span class=\"o\">=</span>12345\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<blockquote>\n <p><strong>NOTE:</strong> This flag takes precedence over the\n<a href=\"/node-feature-discovery/v0.15/reference/worker-configuration-reference.html#corenopublish\"><code class=\"language-plaintext highlighter-rouge\">core.noPublish</code></a>\nconfiguration file option.</p>\n</blockquote>\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<blockquote>\n <p><strong>NOTE:</strong> The logger setup can also be specified via the <code class=\"language-plaintext highlighter-rouge\">core.klog</code>\nconfiguration file options. However, the command line flags take precedence\nover any corresponding config file options specified.</p>\n</blockquote>\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":"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":"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=\"#garbage-collector-parameters\" id=\"markdown-toc-garbage-collector-parameters\">Garbage collector parameters</a></li>\n </ol>\n </li>\n</ol>\n\n<hr />\n\n<p>Node Feature Discovery provides a Helm chart to manage its deployment.</p>\n\n<blockquote>\n <p><strong>NOTE:</strong> NFD is not ideal for other Helm charts to depend on as that may\nresult in multiple parallel NFD deployments in the same cluster which is not\nfully supported 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<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>To tailor the deployment of the Node Feature Discovery to your needs following\nChart parameters are available.</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.15.4</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. <strong>NOTE</strong>: this parameter is related to the deprecated gRPC API and will be removed with it in a future release</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. <strong>NOTE</strong>: this parameter is related to the deprecated gRPC API and will be removed with it in a future release</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">enableNodeFeatureApi</code></td>\n <td>bool</td>\n <td>true</td>\n <td>Enable the <a href=\"/node-feature-discovery/v0.15/usage/custom-resources.html#nodefeature\">NodeFeature</a> CRD API for communicating node features. This will automatically disable the gRPC communication. <strong>NOTE</strong>: this parameter is related to the deprecated gRPC API and will be removed with it in a future release</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">prometheus.enable</code></td>\n <td>bool</td>\n <td>false</td>\n <td>Specifies whether to expose metrics using prometheus operator</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">prometheus.labels</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Specifies labels for use with the prometheus operator to control how it is selected</td>\n </tr>\n </tbody>\n</table>\n\n<p>Metrics are configured to be exposed using prometheus operator API’s by\ndefault. If you want to expose metrics using the prometheus operator\nAPI’s you need to install the prometheus operator in your cluster.</p>\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.enable</code></td>\n <td>bool</td>\n <td>true</td>\n <td>Specifies whether nfd-master should be deployed</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. <strong>NOTE</strong>: this parameter is related to the deprecated gRPC API and will be removed with it in a future release</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">master.metricsPort</code></td>\n <td>integer</td>\n <td>8081</td>\n <td>Port on which to expose metrics from components to prometheus operator</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.resyncPeriod</code></td>\n <td>string</td>\n <td> </td>\n <td>NFD API controller resync period.</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. <strong>NOTE</strong>: this parameter is related to the deprecated gRPC API and will be removed with it in a future release</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. <strong>NOTE</strong>: this parameter is related to the deprecated gRPC API and will be removed with it in a future release</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.nfdApiParallelism</code></td>\n <td>integer</td>\n <td>10</td>\n <td>Specifies the maximum number of concurrent node updates.</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.enable</code></td>\n <td>bool</td>\n <td>true</td>\n <td>Specifies whether nfd-worker should be deployed</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">worker.metricsPort*</code></td>\n <td>int</td>\n <td>8081</td>\n <td>Port on which to expose metrics from components to prometheus operator</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.metricsPort</code></td>\n <td>integer</td>\n <td>8081</td>\n <td>Port on which to expose prometheus metrics</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.daemonsetAnnotations</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Topology updater daemonset <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=\"garbage-collector-parameters\">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\">gc.*</code></td>\n <td>dict</td>\n <td> </td>\n <td>NFD Garbage Collector configuration</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">gc.enable</code></td>\n <td>bool</td>\n <td>true</td>\n <td>Specifies whether the NFD Garbage Collector should be created</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">gc.serviceAccount.create</code></td>\n <td>bool</td>\n <td>true</td>\n <td>Specifies whether the service account for garbage collector should be created</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">gc.serviceAccount.annotations</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Annotations to add to the service account for garbage collector</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">gc.serviceAccount.name</code></td>\n <td>string</td>\n <td> </td>\n <td>The name of the service account for 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\">-gc</code> suffix</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">gc.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 garbage collector</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">gc.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\">gc.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\">gc.resources</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>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\">gc.metricsPort</code></td>\n <td>integer</td>\n <td>8081</td>\n <td>Port on which to serve Prometheus metrics</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">gc.nodeSelector</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>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\">gc.tolerations</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>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\">gc.annotations</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>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\">gc.deploymentAnnotations</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>Garbage collector 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\">gc.affinity</code></td>\n <td>dict</td>\n <td>{}</td>\n <td>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":"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=\"#autodefaultns\" id=\"markdown-toc-autodefaultns\">autoDefaultNs</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 <li><a href=\"#resyncperiod\" id=\"markdown-toc-resyncperiod\">resyncPeriod</a></li>\n <li><a href=\"#leaderelection\" id=\"markdown-toc-leaderelection\">leaderElection</a> <ol>\n <li><a href=\"#leaderelectionleaseduration\" id=\"markdown-toc-leaderelectionleaseduration\">leaderElection.leaseDuration</a></li>\n <li><a href=\"#leaderelectionrenewdeadline\" id=\"markdown-toc-leaderelectionrenewdeadline\">leaderElection.renewDeadline</a></li>\n <li><a href=\"#leaderelectionretryperiod\" id=\"markdown-toc-leaderelectionretryperiod\">leaderElection.retryPeriod</a></li>\n </ol>\n </li>\n <li><a href=\"#nfdapiparallelism\" id=\"markdown-toc-nfdapiparallelism\">nfdApiParallelism</a></li>\n <li><a href=\"#klog\" id=\"markdown-toc-klog\">klog</a> <ol>\n <li><a href=\"#klogadddirheader\" id=\"markdown-toc-klogadddirheader\">klog.addDirHeader</a></li>\n <li><a href=\"#klogalsologtostderr\" id=\"markdown-toc-klogalsologtostderr\">klog.alsologtostderr</a></li>\n <li><a href=\"#kloglogbacktraceat\" id=\"markdown-toc-kloglogbacktraceat\">klog.logBacktraceAt</a></li>\n <li><a href=\"#kloglogdir\" id=\"markdown-toc-kloglogdir\">klog.logDir</a></li>\n <li><a href=\"#kloglogfile\" id=\"markdown-toc-kloglogfile\">klog.logFile</a></li>\n <li><a href=\"#kloglogfilemaxsize\" id=\"markdown-toc-kloglogfilemaxsize\">klog.logFileMaxSize</a></li>\n <li><a href=\"#kloglogtostderr\" id=\"markdown-toc-kloglogtostderr\">klog.logtostderr</a></li>\n <li><a href=\"#klogskipheaders\" id=\"markdown-toc-klogskipheaders\">klog.skipHeaders</a></li>\n <li><a href=\"#klogskiplogheaders\" id=\"markdown-toc-klogskiplogheaders\">klog.skipLogHeaders</a></li>\n <li><a href=\"#klogstderrthreshold\" id=\"markdown-toc-klogstderrthreshold\">klog.stderrthreshold</a></li>\n <li><a href=\"#klogv\" id=\"markdown-toc-klogv\">klog.v</a></li>\n <li><a href=\"#klogvmodule\" id=\"markdown-toc-klogvmodule\">klog.vmodule</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.15.4/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.</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=\"autodefaultns\">autoDefaultNs</h2>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">autoDefaultNs</code> option controls the automatic prefixing of names. When set\nto true (the default in NFD version v0.15) nfd-master\nautomatically adds the default <code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/</code> prefix to\nunprefixed labels, annotations and extended resources - this is also the\ndefault behavior in NFD v0.15 and earlier. When the option is set to <code class=\"language-plaintext highlighter-rouge\">false</code>,\nno prefix will be prepended to unprefixed names, effectively causing them to be\nfiltered out (as NFD does not allow unprefixed names of labels, annotations or\nextended resources). The default will be changed to <code class=\"language-plaintext highlighter-rouge\">false</code> in a future\nrelease.</p>\n\n<p>For example, with the <code class=\"language-plaintext highlighter-rouge\">autoDefaultNs</code> set to <code class=\"language-plaintext highlighter-rouge\">true</code>, a NodeFeatureRule with</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> <span class=\"na\">labels</span><span class=\"pi\">:</span>\n <span class=\"na\">foo</span><span class=\"pi\">:</span> <span class=\"s\">bar</span>\n</code></pre> </div></div>\n\n<p>Will turn into <code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/foo=bar</code> node label. With\n<code class=\"language-plaintext highlighter-rouge\">autoDefaultNs</code> set to <code class=\"language-plaintext highlighter-rouge\">false</code>, no prefix is added and the label will be\nfiltered out.</p>\n\n<p>Note that taint keys are not affected by this option.</p>\n\n<p>Default: <code class=\"language-plaintext highlighter-rouge\">true</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\">autoDefaultNs</span><span class=\"pi\">:</span> <span class=\"no\">false</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.15/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 regular\nexpression or it will not be published.</p>\n\n<blockquote>\n <p>** NOTE:** The regular expression is only matches against the “basename” part\nof the label, i.e. to the part of the name after ‘/’. The label namespace is\nomitted.</p>\n</blockquote>\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\n<h2 id=\"resyncperiod\">resyncPeriod</h2>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">resyncPeriod</code> option specifies the NFD API controller resync period.\nThe resync means nfd-master replaying all NodeFeature and NodeFeatureRule objects,\nthus effectively re-syncing all nodes in the cluster (i.e. ensuring labels, annotations,\nextended resources and taints are in place).\nOnly has effect when the <a href=\"/node-feature-discovery/v0.15/usage/custom-resources.html#nodefeature\">NodeFeature</a>\nCRD API has been enabled with <a href=\"/node-feature-discovery/v0.15/reference/master-commandline-reference.html#-enable-nodefeature-api\"><code class=\"language-plaintext highlighter-rouge\">-enable-nodefeature-api</code></a>.</p>\n\n<p>Default: 1 hour.</p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">resyncPeriod</span><span class=\"pi\">:</span> <span class=\"s\">2h</span>\n</code></pre> </div></div>\n\n<h2 id=\"leaderelection\">leaderElection</h2>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">leaderElection</code> section exposes configuration to tweak leader election.</p>\n\n<h3 id=\"leaderelectionleaseduration\">leaderElection.leaseDuration</h3>\n\n<p><code class=\"language-plaintext highlighter-rouge\">leaderElection.leaseDuration</code> is the duration that non-leader candidates will\nwait to force acquire leadership. This is measured against time of\nlast observed ack.</p>\n\n<p>A client needs to wait a full LeaseDuration without observing a change to\nthe record before it can attempt to take over. When all clients are\nshutdown and a new set of clients are started with different names against\nthe same leader record, they must wait the full LeaseDuration before\nattempting to acquire the lease. Thus LeaseDuration should be as short as\npossible (within your tolerance for clock skew rate) to avoid a possible\nlong waits in the scenario.</p>\n\n<p>Default: 15 seconds.</p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">leaderElection</span><span class=\"pi\">:</span>\n <span class=\"na\">leaseDurtation</span><span class=\"pi\">:</span> <span class=\"s\">15s</span>\n</code></pre> </div></div>\n\n<h3 id=\"leaderelectionrenewdeadline\">leaderElection.renewDeadline</h3>\n\n<p><code class=\"language-plaintext highlighter-rouge\">leaderElection.renewDeadline</code> is the duration that the acting master will retry\nrefreshing leadership before giving up.</p>\n\n<p>This value has to be lower than leaseDuration and greater than retryPeriod*1.2.</p>\n\n<p>Default: 10 seconds.</p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">leaderElection</span><span class=\"pi\">:</span>\n <span class=\"na\">renewDeadline</span><span class=\"pi\">:</span> <span class=\"s\">10s</span>\n</code></pre> </div></div>\n\n<h3 id=\"leaderelectionretryperiod\">leaderElection.retryPeriod</h3>\n\n<p><code class=\"language-plaintext highlighter-rouge\">leaderElection.retryPeriod</code> is the duration the LeaderElector clients should wait\nbetween tries of actions.</p>\n\n<p>It has to be greater than 0.</p>\n\n<p>Default: 2 seconds.</p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">leaderElection</span><span class=\"pi\">:</span>\n <span class=\"na\">retryPeriod</span><span class=\"pi\">:</span> <span class=\"s\">2s</span>\n</code></pre> </div></div>\n\n<h2 id=\"nfdapiparallelism\">nfdApiParallelism</h2>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">nfdApiParallelism</code> option can be used to specify the maximum\nnumber of concurrent node updates.</p>\n\n<p>It takes effect only when <code class=\"language-plaintext highlighter-rouge\">-enable-nodefeature-api</code> has been set.</p>\n\n<p>Default: 10</p>\n\n<p>Example:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"na\">nfdApiParallelism</span><span class=\"pi\">:</span> <span class=\"m\">1</span>\n</code></pre> </div></div>\n\n<h2 id=\"klog\">klog</h2>\n\n<p>The following options specify the logger configuration. Most of which can be\ndynamically adjusted at run-time.</p>\n\n<blockquote>\n <p><strong>NOTE:</strong> The logger options can also be specified via command line flags\nwhich take precedence over any corresponding config file options.</p>\n</blockquote>\n\n<h3 id=\"klogadddirheader\">klog.addDirHeader</h3>\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<h3 id=\"klogalsologtostderr\">klog.alsologtostderr</h3>\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<h3 id=\"kloglogbacktraceat\">klog.logBacktraceAt</h3>\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<h3 id=\"kloglogdir\">klog.logDir</h3>\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<h3 id=\"kloglogfile\">klog.logFile</h3>\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<h3 id=\"kloglogfilemaxsize\">klog.logFileMaxSize</h3>\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<h3 id=\"kloglogtostderr\">klog.logtostderr</h3>\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<h3 id=\"klogskipheaders\">klog.skipHeaders</h3>\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<h3 id=\"klogskiplogheaders\">klog.skipLogHeaders</h3>\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<h3 id=\"klogstderrthreshold\">klog.stderrthreshold</h3>\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<h3 id=\"klogv\">klog.v</h3>\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<h3 id=\"klogvmodule\">klog.vmodule</h3>\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","dir":"/reference/","name":"master-configuration-reference.md","path":"reference/master-configuration-reference.md","url":"/reference/master-configuration-reference.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>The NodeFeature Controller uses NodeFeature objects as\nthe input for the <a href=\"/node-feature-discovery/v0.15/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.15/usage/customization-guide.html#node-labels\">label namespaces</a> are controlled).</p>\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.15/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 is\nreceived from nfd-worker instances through\n<a href=\"/node-feature-discovery/v0.15/usage/custom-resources.html#nodefeature-custom-resource\">NodeFeature</a> objects.</p>\n\n<blockquote>\n <p><strong>NOTE</strong>: when gRPC (<strong>DEPRECATED</strong>) is used for communicating\nthe features (by setting the flag <code class=\"language-plaintext highlighter-rouge\">-enable-nodefeature-api=false</code> on both\nnfd-master and nfd-worker, or via Helm values.enableNodeFeatureApi=false),\n(re-)labelling only happens when a request is received from nfd-worker.\nThat is, in practice rules are evaluated and labels for each node are created\non intervals specified by the\n<a href=\"/node-feature-discovery/v0.15/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.15/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.15/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.15/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.15.4/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 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><strong>Note:</strong> When NFD-Master is intended to run with more than one replica,\nit is advised to use <code class=\"language-plaintext highlighter-rouge\">-enable-leader-election</code> flag. This flag turns on\nleader election for NFD-Master and let only one replica to act on changes\nin NodeFeature and NodeFeatureRule objects.</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 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":"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.15.4\n imagePullPolicy: IfNotPresent\n</span><span class=\"no\">EOF\n</span></code></pre> </div> </div>\n </li>\n</ol>\n\n<h2 id=\"uninstallation\">Uninstallation</h2>\n\n<p>If you followed the deployment instructions above you can uninstall NFD with:</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":"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.15.4/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<blockquote>\n <p><strong>NOTE:</strong> Overridden by the <code class=\"language-plaintext highlighter-rouge\">-label-sources</code> command line flag and the\n<code class=\"language-plaintext highlighter-rouge\">core.sources</code> configurations option (if either of them is specified).</p>\n</blockquote>\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<blockquote>\n <p><strong>NOTE:</strong> <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</blockquote>\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<blockquote>\n <p><strong>NOTE:</strong> The regular expression is only matches against the “basename” part\nof the label, i.e. to the part of the name after ‘/’. The label prefix (or\nnamespace) is omitted.</p>\n</blockquote>\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.15/usage/custom-resources.html#nodefeature\">NodeFeature</a>\nobjects are created or updated in the API server.</p>\n\n<blockquote>\n <p><strong>NOTE:</strong> Overridden by the\n<a href=\"/node-feature-discovery/v0.15/reference/worker-commandline-reference.html#-no-publish\"><code class=\"language-plaintext highlighter-rouge\">-no-publish</code></a>\ncommand line flag (if specified).</p>\n</blockquote>\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<blockquote>\n <p><strong>NOTE:</strong> The logger options can also be specified via command line flags\nwhich take precedence over any corresponding config file options.</p>\n</blockquote>\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<blockquote>\n <p><strong>NOTE:</strong> overridden by <code class=\"language-plaintext highlighter-rouge\">sources.cpu.cpuid.attributeWhitelist</code> (if specified)</p>\n</blockquote>\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, TDX_GUEST]</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<blockquote>\n <p><strong>NOTE:</strong> takes precedence over <code class=\"language-plaintext highlighter-rouge\">sources.cpu.cpuid.attributeBlacklist</code></p>\n</blockquote>\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.15/usage/customization-guide.html#feature-files\">feature files</a> instead.</p>\n\n<blockquote>\n <p><strong>NOTE:</strong> The default NFD container image only supports statically linked\nbinaries. Use the <a href=\"/node-feature-discovery/v0.15/deployment/image-variants.html#full\">full</a> image variant\nfor a slightly more extensive environment that additionally supports bash and\nperl runtimes.</p>\n</blockquote>\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>Default: false</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\">local</span><span class=\"pi\">:</span>\n <span class=\"na\">hooksEnabled</span><span class=\"pi\">:</span> <span class=\"no\">true</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.15/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<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.15/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 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.15/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.15.4/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":"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<blockquote>\n <p><strong>DEPRECATED</strong>: this section only applies when the gRPC API is used, i.e.\nwhen the NodeFeature API is disabled via the <code class=\"language-plaintext highlighter-rouge\">-enable-nodefeature-api=false</code>\nflag on both nfd-master and nfd-worker. The gRPC API is deprecated and will\nbe removed in a future release.</p>\n</blockquote>\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, you can run:</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/cert-manager/cert-manager/releases/download/v1.13.2/cert-manager.yaml\n</code></pre> </div></div>\n\n<p>Alternatively, you can refer to cert-manager documentation for other\ninstallation methods such as the Helm chart they provide.</p>\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.15/deployment/helm.html#deployment\">Deployment</a>\nand <a href=\"/node-feature-discovery/v0.15/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":"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.15.4</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.</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 </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 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<p>There are several environment variables that can be used to customize the\ne2e-tests:</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>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.15.4/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>E2E_TEST_FULL_IMAGE</td>\n <td>Run e2e-test also against the Full Image tag</td>\n <td>false</td>\n </tr>\n <tr>\n <td>E2E_GINKGO_LABEL_FILTER</td>\n <td>Ginkgo label filter to use for running e2e tests</td>\n <td><em>empty</em></td>\n </tr>\n <tr>\n <td>OPENSHIFT</td>\n <td>Non-empty value enables OpenShift specific support (only affects e2e tests)</td>\n <td><em>empty</em></td>\n </tr>\n </tbody>\n</table>\n\n<h2 id=\"running-locally\">Running locally</h2>\n\n<blockquote>\n <p><strong>**DEPRECATED</strong>: Running NFD locally is deprecated and will be removed in a\nfuture release. It depends on the gRPC API which is deprecated and will be\nremoved in a future release. To run NFD locally, use the\n<code class=\"language-plaintext highlighter-rouge\">-enable-nodefeature-api=false</code> flag.</p>\n</blockquote>\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>\nAlso specify <code class=\"language-plaintext highlighter-rouge\">-crd-controller=false</code> and <code class=\"language-plaintext highlighter-rouge\">-enable-nodefeature-api=false</code>\ncommand line flags to disable CRD controller and enable gRPC. 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.15.4\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> <span class=\"nt\">-crd-controller</span><span class=\"o\">=</span><span class=\"nb\">false</span> <span class=\"nt\">-enable-nodefeature-api</span><span class=\"o\">=</span><span class=\"nb\">false\n</span>2019/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>To run nfd-worker as a “stand-alone” container you need to run it in the same\nnetwork namespace as the nfd-master container:</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 <span class=\"nt\">-enable-nodefeature-api</span><span class=\"o\">=</span><span class=\"nb\">false\n</span>2019/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<blockquote>\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\nthe correct <code class=\"language-plaintext highlighter-rouge\">--volume</code> options for them to work correctly when run\nstand-alone directly with <code class=\"language-plaintext highlighter-rouge\">docker run</code>. See\nthe <a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.15.4/deployment/components/common/worker-mounts.yaml\">default deployment</a>\nfor up-to-date information about the required volume mounts.</p>\n</blockquote>\n\n<h3 id=\"nfd-topology-updater\">NFD-Topology-Updater</h3>\n\n<p>To run nfd-topology-updater as a “stand-alone” container\nyou need to run it in with the <code class=\"language-plaintext highlighter-rouge\">-no-publish</code> flag to disable communication to\nthe Kubernetes apiserver.</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=\"k\">${</span><span class=\"nv\">NFD_CONTAINER_IMAGE</span><span class=\"k\">}</span> nfd-topology-updater <span class=\"nt\">-no-publish</span>\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 resource topology discovery without connecting to\nthe Kubernetes API, pass the <code class=\"language-plaintext highlighter-rouge\">-no-publish</code> flag to nfd-topology-updater.</p>\n\n<blockquote>\n <p><strong>NOTE:</strong> NFD topology updater needs certain directories and/or files from\nthe host mounted inside the NFD container. Thus, you need to provide Docker\nwith the correct <code class=\"language-plaintext highlighter-rouge\">--volume</code> options for them to work correctly when\nrun stand-alone directly with <code class=\"language-plaintext highlighter-rouge\">docker run</code>. See\nthe <a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.15.4/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\nnfd-topology-updater. Preceding Kubernetes v1.23, the <code class=\"language-plaintext highlighter-rouge\">kubelet</code> must be\nstarted with the following flag:\n<code class=\"language-plaintext highlighter-rouge\">--feature-gates=KubeletPodResourcesGetAllocatable=true</code>. Starting\nKubernetes v1.23, the <code class=\"language-plaintext highlighter-rouge\">GetAllocatableResources</code> is enabled by default through\n<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</blockquote>\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, 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.15.4/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 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 browser refresh.</p>\n\n<p>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 Cmdline Reference","layout":"default","sort":5,"content":"<h1 class=\"no_toc\" id=\"nfd-topology-updater-commandline-flags\">NFD-Topology-Updater Commandline Flags</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=\"#-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=\"#-metrics\" id=\"markdown-toc--metrics\">-metrics</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\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.15.4 <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=\"-metrics\">-metrics</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">-metrics</code> flag specifies the port on which to expose\n<a href=\"https://prometheus.io/\">Prometheus</a> metrics. Setting this to 0 disables the\nmetrics server on nfd-topology-updater.</p>\n\n<p>Default: 8081</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\">-metrics</span><span class=\"o\">=</span>12345\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_ADDRESS}: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":"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.15/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>Because of the design and implementation of Kubernetes, only resources exclusively\nallocated to <a href=\"https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/#guaranteed\">Guaranteed Quality of Service</a>\npods will be accounted.\nThis includes\n<a href=\"https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#static-policy\">CPU cores</a>,\n<a href=\"https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/#policy-static\">memory</a>\nand\n<a href=\"https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/\">devices</a>.</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.15/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.15/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> with the\n<a href=\"https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#grpc-endpoint-getallocatableresources\">GetAllocatableResources</a> functionality enabled is a\nprerequisite for nfd-topology-updater to be able to run (i.e. Kubernetes v1.21\nor later is required).</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\n<blockquote>\n <p><strong>NOTE:</strong> unlike nfd-worker, dynamic configuration updates are not 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.15/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.15/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.15.4/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":"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<hr />\n\n<p>Follow the uninstallation instructions of the deployment method used\n(<a href=\"/node-feature-discovery/v0.15/deployment/kustomize.html#uninstallation\">kustomize</a>,\n<a href=\"/node-feature-discovery/v0.15/deployment/helm.html#uninstalling-the-chart\">helm</a> or\n<a href=\"/node-feature-discovery/v0.15/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.15.4\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.15.4\n</code></pre> </div></div>\n\n<blockquote>\n <p><strong>NOTE:</strong> You must run prune before removing the RBAC rules (serviceaccount,\nclusterrole and clusterrolebinding).</p>\n</blockquote>\n","dir":"/deployment/","name":"uninstallation.md","path":"deployment/uninstallation.md","url":"/deployment/uninstallation.html"},{"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.15.4/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":"NFD-Garbage-Collector","layout":"default","sort":6,"content":"<h1 class=\"no_toc\" id=\"nfd-gc\">NFD-GC</h1>\n\n<hr />\n\n<p>NFD-GC (NFD Garbage-Collector) is preferably run as a Kubernetes deployment\nwith one replica. It makes sure that all\n<a href=\"/node-feature-discovery/v0.15/usage/custom-resources.html#nodefeature\">NodeFeature</a> and\n<a href=\"/node-feature-discovery/v0.15/usage/custom-resources.html#noderesourcetopology\">NodeResourceTopology</a> objects\nhave corresponding nodes and removes stale objects for non-existent nodes.</p>\n\n<p>The daemon watches for Node deletion events and removes NodeFeature and\nNodeResourceTopology objects upon them. It also runs periodically to make sure\nno node delete event was missed and to remove any NodeFeature or\nNodeResourceTopology objects that were created without corresponding node. The\ndefault garbage collector interval is set to 1h which is the value when no\n-gc-interval is specified.</p>\n\n<h2 id=\"configuration\">Configuration</h2>\n\n<p>In Helm deployments (see\n<a href=\"/node-feature-discovery/v0.15/deployment/helm.html#garbage-collector-parameters\">garbage collector parameters</a>)\nNFD-GC will only be deployed when <code class=\"language-plaintext highlighter-rouge\">enableNodeFeatureApi</code> or\n<code class=\"language-plaintext highlighter-rouge\">topologyUpdater.enable</code> is set to true.</p>\n","dir":"/usage/","name":"nfd-gc.md","path":"usage/nfd-gc.md","url":"/usage/nfd-gc.html"},{"title":"Metrics","layout":"default","sort":7,"content":"<h1 id=\"metrics\">Metrics</h1>\n\n<p>Metrics are configured to be exposed using <a href=\"https://github.com/prometheus-operator/prometheus-operator\">prometheus operator</a>\nAPI’s by default. If you want to expose metrics using the prometheus operator\nAPI’s you need to install the prometheus operator in your cluster.\nBy default NFD Master and Worker expose metrics on port 8081.</p>\n\n<p>The exposed metrics are</p>\n\n<table>\n <thead>\n <tr>\n <th>Metric</th>\n <th>Type</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">nfd_master_build_info</code></td>\n <td>Gauge</td>\n <td>Version from which nfd-master was built</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">nfd_worker_build_info</code></td>\n <td>Gauge</td>\n <td>Version from which nfd-worker was built</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">nfd_gc_build_info</code></td>\n <td>Gauge</td>\n <td>Version from which nfd-gc was built</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">nfd_topology_updater_build_info</code></td>\n <td>Gauge</td>\n <td>Version from which nfd-topology-updater was built</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">nfd_node_update_requests_total</code></td>\n <td>Counter</td>\n <td>Number of node update requests received by the master over gRPC</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">nfd_node_updates_total</code></td>\n <td>Counter</td>\n <td>Number of nodes updated</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">nfd_node_update_failures_total</code></td>\n <td>Counter</td>\n <td>Number of nodes update failures</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">nfd_node_labels_rejected_total</code></td>\n <td>Counter</td>\n <td>Number of nodes labels rejected by nfd-master</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">nfd_node_extendedresources_rejected_total</code></td>\n <td>Counter</td>\n <td>Number of nodes extended resources rejected by nfd-master</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">nfd_node_taints_rejected_total</code></td>\n <td>Counter</td>\n <td>Number of nodes taints rejected by nfd-master</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">nfd_nodefeaturerule_processing_duration_seconds</code></td>\n <td>Histogram</td>\n <td>Time taken to process NodeFeatureRule objects</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">nfd_nodefeaturerule_processing_errors_total</code></td>\n <td>Counter</td>\n <td>Number or errors encountered while processing NodeFeatureRule objects</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">nfd_feature_discovery_duration_seconds</code></td>\n <td>Histogram</td>\n <td>Time taken to discover features on a node</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">nfd_topology_updater_scan_errors_total</code></td>\n <td>Counter</td>\n <td>Number of errors in scanning resource allocation of pods.</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">nfd_gc_objects_deleted_total</code></td>\n <td>Counter</td>\n <td>Number of NodeFeature and NodeResourceTopology objects garbage collected.</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">nfd_gc_object_delete_failures_total</code></td>\n <td>Counter</td>\n <td>Number of errors in deleting NodeFeature and NodeResourceTopology objects.</td>\n </tr>\n </tbody>\n</table>\n\n<h2 id=\"kustomize\">Kustomize</h2>\n\n<p>To deploy NFD with metrics enabled using kustomize, you can use the\n<a href=\"/node-feature-discovery/v0.15/deployment/kustomize.html#metrics\">prometheus overlay</a>.</p>\n\n<h2 id=\"helm\">Helm</h2>\n\n<p>By default metrics are enabled when deploying NFD via Helm. To enable Prometheus\nto scrape metrics from NFD, you need to pass the following values to Helm:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nt\">--set</span> prometheus.enable<span class=\"o\">=</span><span class=\"nb\">true</span>\n</code></pre> </div></div>\n\n<p>For more info on Helm deployment, see <a href=\"/node-feature-discovery/v0.15/deployment/helm.html\">Helm</a>.</p>\n\n<p>It is recommended to specify\n<code class=\"language-plaintext highlighter-rouge\">--set prometheus.prometheusSpec.podMonitorSelectorNilUsesHelmValues=false</code>\nwhen deploying prometheus-operator via Helm to enable the prometheus-operator\nto scrape metrics from any PodMonitor.</p>\n\n<p>or setting labels on the PodMonitor via the helm parameter <code class=\"language-plaintext highlighter-rouge\">prometheus.labels</code>\nto control which Prometheus instances will scrape this PodMonitor.</p>\n\n<h2 id=\"grafana-dashboard\">Grafana dashboard</h2>\n\n<p>NFD contains an example Grafana dashboard. You can import\n<a href=\"https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/v0.15.4/examples/grafana-dashboard.json\"><code class=\"language-plaintext highlighter-rouge\">examples/grafana-dashboard.json</code></a>\nto your Grafana instance to visualize the NFD metrics.</p>\n","dir":"/deployment/","name":"metrics.md","path":"deployment/metrics.md","url":"/deployment/metrics.html"},{"title":"Garbage Collector Cmdline Reference","layout":"default","sort":7,"content":"<h1 class=\"no_toc\" id=\"nfd-gc-commandline-flags\">NFD-GC Commandline Flags</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=\"#-gc-interval\" id=\"markdown-toc--gc-interval\">-gc-interval</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-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.15.4 <span class=\"se\">\\</span>\nnfd-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-gc <span class=\"nt\">-gc-interval</span><span class=\"o\">=</span>1h\n</code></pre> </div></div>\n","dir":"/reference/","name":"gc-commandline-reference.md","path":"reference/gc-commandline-reference.md","url":"/reference/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>NodeFeature is an NFD-specific custom resource for communicating node\nfeatures and node labeling requests. The nfd-master pod watches for NodeFeature\nobjects, labels nodes as specified and uses the listed features as input when\nevaluating <a href=\"#nodefeaturerule\">NodeFeatureRule</a>s. NodeFeature objects can be\nused for implementing 3rd party extensions (see\n<a href=\"/node-feature-discovery/v0.15/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.15/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<p>The\n<a href=\"https://github.com/kubernetes-sigs/node-feature-discovery/tree/v0.15.4/deployment/nodefeaturerule/samples\"><code class=\"language-plaintext highlighter-rouge\">deployment/nodefeaturerule/samples/</code></a>\ndirectory contains sample NodeFeatureRule objects that replicate the built-in\ndefault feature labels generated by NFD. The sample rules can be used as a base\nto customize NFD feature labels. To use them in place of the the NFD built-in\nlabels, the corresponding feature source(s) of nfd-worker should be disabled\nwith the\n<a href=\"/node-feature-discovery/v0.15/reference/worker-configuration-reference.html#corelabelsources\"><code class=\"language-plaintext highlighter-rouge\">core.labelSources</code></a>\nconfiguration option.</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":"Kubectl plugin cmdline reference","layout":"default","sort":8,"content":"<h1 class=\"no_toc\" id=\"commandline-flags-of-kubectl-nfd-plugin\">Commandline flags of kubectl-nfd (plugin)</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=\"#validate\" id=\"markdown-toc-validate\">Validate</a> <ol>\n <li><a href=\"#-f--nodefeature-file\" id=\"markdown-toc--f--nodefeature-file\">-f / –nodefeature-file</a></li>\n </ol>\n </li>\n <li><a href=\"#test\" id=\"markdown-toc-test\">Test</a> <ol>\n <li><a href=\"#-k-kubeconfig\" id=\"markdown-toc--k-kubeconfig\">-k, –kubeconfig</a></li>\n <li><a href=\"#-s-namespace\" id=\"markdown-toc--s-namespace\">-s, –namespace</a></li>\n <li><a href=\"#-n-nodename\" id=\"markdown-toc--n-nodename\">-n, –nodename</a></li>\n <li><a href=\"#-f-nodefeaturerule-file\" id=\"markdown-toc--f-nodefeaturerule-file\">-f, –nodefeaturerule-file</a></li>\n </ol>\n </li>\n <li><a href=\"#dryrun\" id=\"markdown-toc-dryrun\">DryRun</a> <ol>\n <li><a href=\"#-f-nodefeaturerule-file-1\" id=\"markdown-toc--f-nodefeaturerule-file-1\">-f, –nodefeaturerule-file</a></li>\n <li><a href=\"#-n-nodefeature-file\" id=\"markdown-toc--n-nodefeature-file\">-n, –nodefeature-file</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\">kubectl nfd -help</code>.</p>\n\n<h3 id=\"-h--help\">-h, -help</h3>\n\n<p>Print usage and exit.</p>\n\n<h2 id=\"validate\">Validate</h2>\n\n<p>Validate a NodeFeatureRule file.</p>\n\n<h3 id=\"-f--nodefeature-file\">-f / –nodefeature-file</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">--nodefeature-file</code> flag specifies the path to the NodeFeatureRule file\nto validate.</p>\n\n<h2 id=\"test\">Test</h2>\n\n<p>Test a NodeFeatureRule file against a node without applying it.</p>\n\n<h3 id=\"-k-kubeconfig\">-k, –kubeconfig</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">--kubeconfig</code> flag specifies the path to the kubeconfig file to use for\nCLI requests.</p>\n\n<h3 id=\"-s-namespace\">-s, –namespace</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">--namespace</code> flag specifies the namespace to use for CLI requests.\nDefault: <code class=\"language-plaintext highlighter-rouge\">default</code>.</p>\n\n<h3 id=\"-n-nodename\">-n, –nodename</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">--nodename</code> flag specifies the name of the node to test the\nNodeFeatureRule against.</p>\n\n<h3 id=\"-f-nodefeaturerule-file\">-f, –nodefeaturerule-file</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">--nodefeaturerule-file</code> flag specifies the path to the NodeFeatureRule file\nto test.</p>\n\n<h2 id=\"dryrun\">DryRun</h2>\n\n<p>Process a NodeFeatureRule file against a NodeFeature file.</p>\n\n<h3 id=\"-f-nodefeaturerule-file-1\">-f, –nodefeaturerule-file</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">--nodefeaturerule-file</code> flag specifies the path to the NodeFeatureRule file\nto test.</p>\n\n<h3 id=\"-n-nodefeature-file\">-n, –nodefeature-file</h3>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">--nodefeature-file</code> flag specifies the path to the NodeFeature file to test.</p>\n","dir":"/reference/","name":"plugin-commandline-reference.md","path":"reference/plugin-commandline-reference.md","url":"/reference/plugin-commandline-reference.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=\"#node-tainting\" id=\"markdown-toc-node-tainting\">Node tainting</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=\"#an-example\" id=\"markdown-toc-an-example\">An example</a></li>\n <li><a href=\"#feature-files\" id=\"markdown-toc-feature-files\">Feature files</a></li>\n <li><a href=\"#hooks\" id=\"markdown-toc-hooks\">Hooks</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=\"#feature-rule-format\" id=\"markdown-toc-feature-rule-format\">Feature 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</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> 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 reading text files and executing hooks.</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>NodeFeature 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>The NodeFeature CRD API can be disabled with the\n<code class=\"language-plaintext highlighter-rouge\">-enable-nodefeature-api=false</code> command line flag. This flag must be specified\nfor both nfd-master and nfd-worker as it will enable the gRPC communication\nbetween them. Note that the gRPC API is <strong>DEPRECATED</strong> and will be removed in a\nfuture release, at which point the NodeFeature API cannot be disabled.</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.io/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\">vendor.io/feature.enabled=true</code> node label to be created.</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\">feature.node.kubernetes.io/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.kubernetes.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.15.4/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=\"#feature-rule-format\">Feature rule format</a> for detailed description of\navailable fields and how to write labeling rules.</p>\n\n<h3 id=\"node-tainting\">Node tainting</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>See documentation of the <a href=\"#taints\">taints field</a> for detailed description how\nto specify taints in the NodeFeatureRule object.</p>\n\n<blockquote>\n <p><strong>NOTE:</strong> Before enabling any taints, make sure to edit nfd-worker daemonset\nto tolerate the taints to be created. Otherwise, already running pods that do\nnot tolerate the taint are evicted immediately from the node including the\nnfd-worker pod.</p>\n</blockquote>\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, feature\nfiles and hooks (deprecated). The features discovered by the <code class=\"language-plaintext highlighter-rouge\">local</code> source can\nfurther be used 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<blockquote>\n <p><strong>NOTE:</strong> Be careful when creating and/or updating hook or feature files\nwhile NFD is running. To avoid race conditions you should write\ninto a temporary file, and atomically create/update the original file by\ndoing a file rename operation. NFD ignores dot files,\nso temporary file can be written to the same directory and renamed\n(<code class=\"language-plaintext highlighter-rouge\">.my.feature</code> -> <code class=\"language-plaintext highlighter-rouge\">my.feature</code>) once file is complete. Both file names should\n(obviously) be unique for the given application.</p>\n</blockquote>\n\n<h3 id=\"an-example\">An example</h3>\n\n<p>Consider a plaintext file\n<code class=\"language-plaintext highlighter-rouge\">/etc/kubernetes/node-feature-discovery/features.d/my-features</code>\nhaving the following contents (or alternatively 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):</p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>feature.node.kubernetes.io/my-feature.1\nfeature.node.kubernetes.io/my-feature.2=myvalue\nvendor.io/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\">vendor.io/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=\"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>. File content is parsed\nand translated into node labels, see the <a href=\"#input-format\">input format below</a>.</p>\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 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<blockquote>\n <p><strong>NOTE:</strong> Hooks are being DEPRECATED and will be removed in a future release.\nStarting from release v0.14 hooks are disabled by default and can be enabled\nvia <code class=\"language-plaintext highlighter-rouge\">sources.local.hooksEnabled</code> field in the worker configuration.</p>\n</blockquote>\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<blockquote>\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.15/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</blockquote>\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># This is a comment\n<key>[=<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 must be specified with <code class=\"language-plaintext highlighter-rouge\"><namespace>/<name>[=<value>]</code>.</p>\n\n<blockquote>\n <p><strong>NOTE:</strong> The feature file size limit it 64kB. The feature file will be\nignored if the size limit is exceeded.</p>\n</blockquote>\n\n<p>Comment lines (starting with <code class=\"language-plaintext highlighter-rouge\">#</code>) are ignored.</p>\n\n<p>Adding following line anywhere to feature file defines date when\nits content expires / is ignored:</p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code># +expiry-time=2023-07-29T11:22:33Z\n</code></pre> </div></div>\n\n<p>Also, the expiry-time value would stay the same during the processing of the\nfeature file until another expiry-time directive is encountered.\nConsidering the following file:</p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code># +expiry-time=2012-07-28T11:22:33Z\nvendor.io/feature1=featureValue\n\n# +expiry-time=2080-07-28T11:22:33Z\nvendor.io/feature2=featureValue2\n\n# +expiry-time=2070-07-28T11:22:33Z\nvendor.io/feature3=featureValue3\n\n# +expiry-time=2002-07-28T11:22:33Z\nvendor.io/feature4=featureValue4\n</code></pre> </div></div>\n\n<p>After processing the above file, only <code class=\"language-plaintext highlighter-rouge\">vendor.io/feature2</code> and\n<code class=\"language-plaintext highlighter-rouge\">vendor.io/feature3</code> would be included in the list of accepted features.</p>\n\n<blockquote>\n <p><strong>NOTE:</strong> The time format supported is RFC3339. Also, the <code class=\"language-plaintext highlighter-rouge\">expiry-time</code>\ntag is only evaluated in each re-discovery period, and the expiration of\nnode labels is not tracked.</p>\n</blockquote>\n\n<p>To exclude specific features from the <code class=\"language-plaintext highlighter-rouge\">local.feature</code> Feature, you can use the\n<code class=\"language-plaintext highlighter-rouge\"># +no-feature</code> directive. The <code class=\"language-plaintext highlighter-rouge\"># +no-label</code> directive causes the feature to\nbe excluded from the <code class=\"language-plaintext highlighter-rouge\">local.label</code> Feature and a node label not to be generated.</p>\n\n<p>Considering the following file:</p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code># +no-feature\nvendor.io/label-only=value\n\nvendor.io/my-feature=value\n\nvendor.io/foo=bar\n\n# +no-label\nfoo=baz\n</code></pre> </div></div>\n\n<p>Processing the above file would result in the following Features:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"s\">local.features</span><span class=\"pi\">:</span>\n <span class=\"na\">foo</span><span class=\"pi\">:</span> <span class=\"s\">baz</span>\n <span class=\"s\">vendor.io/my-feature</span><span class=\"pi\">:</span> <span class=\"s\">value</span>\n<span class=\"s\">local.labels</span><span class=\"pi\">:</span>\n <span class=\"s\">vendor.io/label-only</span><span class=\"pi\">:</span> <span class=\"s\">value</span>\n <span class=\"s\">vendor.io/my-feature</span><span class=\"pi\">:</span> <span class=\"s\">value</span>\n</code></pre> </div></div>\n\n<p>and the following labels added to the Node:</p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>vendor.io/label-only=value\nvendor.io/my-feature=value\n</code></pre> </div></div>\n\n<blockquote>\n <p><strong>NOTE:</strong> use of unprefixed label names (like <code class=\"language-plaintext highlighter-rouge\">foo=bar</code>) should not be used.\nIn NFD v0.15 unprefixed names will be automatically prefixed\nwith <code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/</code> but this will change in a future version\n(see\n<a href=\"/node-feature-discovery/v0.15/reference/master-configuration-reference.html#autoDefaultNs\">autoDefaultNs config option</a>.\nUnprefixed names for plain Features (tagged with <code class=\"language-plaintext highlighter-rouge\"># +no-label</code>) can be used\nwithout restrictions, however.</p>\n</blockquote>\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 feature files and hooks 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 feature files and hooks to\nNFD. NFD periodically scans the directories and reads any feature files and\nruns any hooks 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.15/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\">feature.node.kubenernetes.io/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\">feature.node.kubenernetes.io/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.15.4/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>.</li>\n <li>Namespaces may be excluded with the\n<a href=\"/node-feature-discovery/v0.15/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.15/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=\"feature-rule-format\">Feature 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\">feature.node.kubernetes.io/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.kubernetes.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<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-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\">dynamic</span><span class=\"nv\"> </span><span class=\"s\">label</span><span class=\"nv\"> </span><span class=\"s\">value</span><span class=\"nv\"> </span><span class=\"s\">rule\"</span>\n <span class=\"na\">labels</span><span class=\"pi\">:</span>\n <span class=\"s\">feature.node.kubernetes.io/linux-lsm-enabled</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">@kernel.config.LSM\"</span>\n <span class=\"s\">feature.node.kubernetes.io/custom-label</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">customlabel\"</span>\n</code></pre> </div></div>\n\n<p>Label <code class=\"language-plaintext highlighter-rouge\">linux-lsm-enabled</code> uses the <code class=\"language-plaintext highlighter-rouge\">@</code> notation for dynamic values.\nThe value of the label will be the value of the attribute <code class=\"language-plaintext highlighter-rouge\">LSM</code>\nof the feature <code class=\"language-plaintext highlighter-rouge\">kernel.config</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 label. See\n<a href=\"#available-features\">available features</a> for possible values to use.</p>\n\n<p>This will yield into the following node label:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> <span class=\"na\">labels</span><span class=\"pi\">:</span>\n <span class=\"s\">...</span>\n <span class=\"s\">feature.node.kubernetes.io/linux-lsm-enabled</span><span class=\"pi\">:</span> <span class=\"s\">apparmor</span>\n <span class=\"s\">feature.node.kubernetes.io/custom-label</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">customlabel\"</span>\n</code></pre> </div></div>\n\n<h4 id=\"labelstemplate\">labelsTemplate</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<blockquote>\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</blockquote>\n\n<h4 id=\"annotations\">annotations</h4>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">.annotations</code> field is a list of features to be advertised as node\nannotations.</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\">feature-annotations-example</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\">annotation-example\"</span>\n <span class=\"na\">annotations</span><span class=\"pi\">:</span>\n <span class=\"s\">feature.node.kubernetes.io/defaul-ns-annotation</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">foo\"</span>\n <span class=\"s\">custom.vendor.io/feature</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">baz\"</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>This will yield into the following node annotations:</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> <span class=\"na\">annotations</span><span class=\"pi\">:</span>\n <span class=\"s\">...</span>\n <span class=\"s\">feature.node.kubernetes.io/defaul-ns-annotation</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">foo\"</span>\n <span class=\"s\">custom.vendor.io/feature</span><span class=\"pi\">:</span> <span class=\"s2\">\"</span><span class=\"s\">baz\"</span>\n <span class=\"s\">...</span>\n</code></pre> </div></div>\n\n<p>NFD enforces some limitations to the namespace (or prefix)/ of the annotations:</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 (like <code class=\"language-plaintext highlighter-rouge\">my-annotation</code>) should not be used. In NFD v0.15 unprefixed names will be automatically prefixed with\n<code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/</code> but this will change in a future version (see\n<a href=\"/node-feature-discovery/v0.15/reference/master-configuration-reference.html#autoDefaultNs\">autoDefaultNs config option</a>.</li>\n</ul>\n\n<blockquote>\n <p><strong>NOTE:</strong> The <code class=\"language-plaintext highlighter-rouge\">annotations</code> field has will only advertise features via node\nannotations the features won’t be advertised as node labels unless they are\nspecified in the <code class=\"language-plaintext highlighter-rouge\">labels</code> field.</p>\n</blockquote>\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>Example NodeFeatureRule with 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,\n<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<blockquote>\n <p><strong>NOTE:</strong> taints field is not available for the custom rules of nfd-worker\nand only for NodeFeatureRule objects.</p>\n</blockquote>\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=\"extendedresources\">extendedResources</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 (like <code class=\"language-plaintext highlighter-rouge\">my-er</code>) site.version }} unprefixed names will be\nautomatically prefixed with <code class=\"language-plaintext highlighter-rouge\">feature.node.kubernetes.io/</code> but this will\nchange in a future version (see\n<a href=\"/node-feature-discovery/v0.15/reference/master-configuration-reference.html#autoDefaultNs\">autoDefaultNs config option</a>.</li>\n</ul>\n\n<blockquote>\n <p><strong>NOTE:</strong> <code class=\"language-plaintext highlighter-rouge\">.extendedResources</code> is not supported by the\n<a href=\"#custom-feature-source\">custom feature source</a> – it can only be used in\nNodeFeatureRule objects.</p>\n</blockquote>\n\n<h4 id=\"varstemplate\">varsTemplate</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<blockquote>\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</blockquote>\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 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 <span class=\"na\">matchName</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 which to evaluate.</p>\n\n<blockquote>\n <p><strong>NOTE:</strong>If both <a href=\"#matchexpressions\"><code class=\"language-plaintext highlighter-rouge\">matchExpressions</code></a> and\n<a href=\"#matchname\"><code class=\"language-plaintext highlighter-rouge\">matchName</code></a> are specified, they both must match.</p>\n</blockquote>\n\n<h5 id=\"matchexpressions\">matchExpressions</h5>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">.matchFeatures[].matchExpressions</code> field is used to match against the\nvalue(s) of a feature. The <code class=\"language-plaintext highlighter-rouge\">matchExpressions</code> field consists of a set of\nexpressions, each of which is evaluated against all elements of the specified\nfeature.</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> <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>In each MatchExpression the <code class=\"language-plaintext highlighter-rouge\">key</code> specifies the name of of the feature element\n(<em>flag</em> and <em>attribute</em> features) or name of the attribute (<em>instance</em>\nfeatures) which to look for. The behavior of MatchExpression depends on the\n<a href=\"#feature-types\">feature type</a>:</p>\n\n<ul>\n <li>for <em>flag</em> and <em>attribute</em> features the MatchExpression operates on the\nfeature element whose name matches the <code class=\"language-plaintext highlighter-rouge\"><key></code></li>\n <li>for <em>instance</em> features all MatchExpressions are evaluated against the\nattributes of each instance separately</li>\n</ul>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">op</code> field specifies the operator to apply. Valid values are described\nbelow.</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<h5 id=\"matchname\">matchName</h5>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">.matchFeatures[].matchName</code> field is used to match against the\nname(s) of a feature (whereas the <a href=\"#matchexpressions\"><code class=\"language-plaintext highlighter-rouge\">matchExpressions</code></a> field\nmatches against the value(s). The <code class=\"language-plaintext highlighter-rouge\">matchName</code> field consists of a single\nexpression which is evaulated against the name of each element of the specified\nfeature.</p>\n\n<div class=\"language-yaml highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> <span class=\"na\">matchName</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 behavior of <code class=\"language-plaintext highlighter-rouge\">matchName</code> depends on the <a href=\"#feature-types\">feature type</a>:</p>\n\n<ul>\n <li>for <em>flag</em> and <em>attribute</em> features the expression is evaluated against the\nname of each element</li>\n <li>for <em>instance</em> features the expression is evaluated against the name of\neach attribute, for each element (instance) separately (matches if the\nattributes of any of the elements satisfy the expression)</li>\n</ul>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">op</code> field specifies the operator to apply. Same operators as for\n<a href=\"#matchexpressions\"><code class=\"language-plaintext highlighter-rouge\">matchExpressions</code></a> above are available.</p>\n\n<table>\n <thead>\n <tr>\n <th>Operator</th>\n <th>Number of values</th>\n <th>Matches</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>All name 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>All name that 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>All name that matches any of the values (treated as regexps)</td>\n </tr>\n <tr>\n <td><code class=\"language-plaintext highlighter-rouge\">Exists</code></td>\n <td>0</td>\n <td>All elements</td>\n </tr>\n </tbody>\n</table>\n\n<p>Other operators are not practical with <code class=\"language-plaintext highlighter-rouge\">matchName</code> (<code class=\"language-plaintext highlighter-rouge\">DoesNotExist</code> never\nmatches; <code class=\"language-plaintext highlighter-rouge\">Gt</code>,<code class=\"language-plaintext highlighter-rouge\">Lt</code> and <code class=\"language-plaintext highlighter-rouge\">GtLt</code> are only usable if feature names are integers;\n<code class=\"language-plaintext highlighter-rouge\">IsTrue</code> and <code class=\"language-plaintext highlighter-rouge\">IsFalse</code> are only usable if the feature name is <code class=\"language-plaintext highlighter-rouge\">true</code> or\n<code class=\"language-plaintext highlighter-rouge\">false</code>).</p>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">value</code> field is a list of string arguments to the operator.</p>\n\n<p>An example:</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\">cpu.cpuid</span>\n <span class=\"na\">matchName</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\">^AVX\"</span><span class=\"pi\">]}</span>\n</code></pre> </div></div>\n\n<p>The snippet above would match if any CPUID feature starting with AVX is present\n(e.g. AVX1 or AVX2 or AVX512F etc).</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 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\">tdx.protected</code></strong></td>\n <td>bool</td>\n <td><code class=\"language-plaintext highlighter-rouge\">true</code> if a guest VM was started using Intel TDX (Trusted Domain Extensions), 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.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> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">sev.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> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">sev.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.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.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> </td>\n <td> </td>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">socket_count</code></strong></td>\n <td>int</td>\n <td>Number of CPU Sockets</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>Labels from feature files and hooks, i.e. labels from the <a href=\"#local-feature-source\"><em>local</em> feature source</a></td>\n </tr>\n <tr>\n <td><strong><code class=\"language-plaintext highlighter-rouge\">local.feature</code></strong></td>\n <td>attribute</td>\n <td> </td>\n <td> </td>\n <td>Features from feature files and hooks, i.e. features 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\">network.virtual</code></strong></td>\n <td>instance</td>\n <td> </td>\n <td> </td>\n <td>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></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.block</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\n0fff.</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<blockquote>\n <p><strong>NOTE:</strong>If both <code class=\"language-plaintext highlighter-rouge\">matchExpressions</code> and <code class=\"language-plaintext highlighter-rouge\">matchName</code> for a feature matcher\nterm (see <a href=\"#matchfeatures\"><code class=\"language-plaintext highlighter-rouge\">matchFeatures</code></a>) is specified, the list of\nmatched features (for the template engine) is the union from both of these.\n<!-- note #2 -->\n<strong>NOTE:</strong> In case of matchAny is specified, the template is executed\nseparately against each individual <code class=\"language-plaintext highlighter-rouge\">matchFeatures</code> field and the final set of\nlabels will be superset of all these separate template expansions. E.g.\nconsider the following:</p>\n</blockquote>\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 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 the\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","dir":"/usage/","name":"customization-guide.md","path":"usage/customization-guide.md","url":"/usage/customization-guide.html"},{"title":"Versions","layout":"default","sort":9,"content":"<h1 class=\"no_toc\" id=\"versions-and-deprecation\">Versions and deprecation</h1>\n\n<hr />\n\n<h2 id=\"supported-versions\">Supported versions</h2>\n\n<p>Node Feature Discovery follows <a href=\"https://semver.org/\">semantic versioning</a> where\nthe version number consists of three components, i.e. <strong>MAJOR.MINOR.PATCH</strong>.</p>\n\n<p>The most recent two minor releases (or release branches) of Node Feature\nDiscovery are supported. That is, with X being the latest release, <strong>X</strong> and <strong>X-1</strong>\nare supported and <strong>X-1</strong> reaches end-of-life when <strong>X+1</strong> is released.</p>\n\n<h2 id=\"deprecation-policy\">Deprecation policy</h2>\n\n<h3 id=\"feature-labels\">Feature labels</h3>\n\n<p>Built-in <a href=\"/node-feature-discovery/v0.15/usage/features.html\">feature labels</a> and\n<a href=\"../usage/customization-guide.html#available-features\">features</a> are supported\nfor 2 releases after being deprecated, at minimum. That is, if a feature label\nis deprecated in version <strong>X</strong>, it will be supported in <strong>X+1</strong> and <strong>X+2</strong> and\nmay be dropped in <strong>X+3</strong>.</p>\n\n<h3 id=\"configuration-options\">Configuration options</h3>\n\n<p>Command-line flags and configuration file options are supported for 1 more\nrelease after being deprecated, at minimum. That is, if option/flag is\ndeprecated in version <strong>X</strong>, it will be supported in <strong>X+1</strong> and may be removed\nin <strong>X+2</strong>.</p>\n\n<p>The same policy (support for 1 release after deprecation) also applies to Helm\nchart parameters.</p>\n","dir":"/reference/","name":"versions.md","path":"reference/versions.md","url":"/reference/versions.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.15.4/demo\">demo/</a>.</p>\n","dir":"/usage/","name":"examples-and-demos.md","path":"usage/examples-and-demos.md","url":"/usage/examples-and-demos.html"},{"title":"Kubectl plugin","layout":"default","sort":10,"content":"<h1 class=\"no_toc\" id=\"kubectl-plugin\">Kubectl plugin</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> <ol>\n <li><a href=\"#validate\" id=\"markdown-toc-validate\">Validate</a></li>\n <li><a href=\"#test\" id=\"markdown-toc-test\">Test</a></li>\n <li><a href=\"#dryrun\" id=\"markdown-toc-dryrun\">DryRun</a></li>\n </ol>\n </li>\n</ol>\n\n<hr />\n\n<blockquote>\n <p><strong><em>Developer Preview</em></strong> This feature is currently in developer preview and\nsubject to change. It is not recommended to use it in production\nenvironments.</p>\n</blockquote>\n\n<h2 id=\"overview\">Overview</h2>\n\n<p>The <code class=\"language-plaintext highlighter-rouge\">kubectl</code> plugin <code class=\"language-plaintext highlighter-rouge\">kubectl nfd</code> can be used to validate/dryrun and test\nNodeFeatureRule objects. It can be installed with the following command:</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\nmake build-kubectl-nfd\n<span class=\"nv\">KUBECTL_PATH</span><span class=\"o\">=</span>/usr/local/bin/\n<span class=\"nb\">mv</span> ./bin/kubectl-nfd <span class=\"k\">${</span><span class=\"nv\">KUBECTL_PATH</span><span class=\"k\">}</span>\n</code></pre> </div></div>\n\n<h3 id=\"validate\">Validate</h3>\n\n<p>The plugin can be used to validate a NodeFeatureRule object:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>kubectl nfd validate <span class=\"nt\">-f</span> <nodefeaturerule.yaml>\n</code></pre> </div></div>\n\n<h3 id=\"test\">Test</h3>\n\n<p>The plugin can be used to test a NodeFeatureRule object against a node:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>kubectl nfd <span class=\"nb\">test</span> <span class=\"nt\">-f</span> <nodefeaturerule.yaml> <span class=\"nt\">-n</span> <node-name>\n</code></pre> </div></div>\n\n<h3 id=\"dryrun\">DryRun</h3>\n\n<p>The plugin can be used to DryRun a NodeFeatureRule object against a NodeFeature\nfile:</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>kubectl get <span class=\"nt\">-n</span> node-feature-discovery nodefeature <nodename> <span class=\"nt\">-o</span> yaml <span class=\"o\">></span> <nodefeature.yaml>\nkubectl nfd dryrun <span class=\"nt\">-f</span> <nodefeaturerule.yaml> <span class=\"nt\">-n</span> <nodefeature.yaml>\n</code></pre> </div></div>\n\n<p>Or you can use the example NodeFeature file(it is a minimal NodeFeature file):</p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nv\">$ </span>kubectl nfd dryrun <span class=\"nt\">-f</span> examples/nodefeaturerule.yaml <span class=\"nt\">-n</span> examples/nodefeature.yaml\nEvaluating NodeFeatureRule <span class=\"s2\">\"examples/nodefeaturerule.yaml\"</span> against NodeFeature <span class=\"s2\">\"examples/nodefeature.yaml\"</span>\nProcessing rule: my sample rule\n<span class=\"k\">***</span> Labels <span class=\"k\">***</span>\nvendor.io/my-sample-feature<span class=\"o\">=</span><span class=\"nb\">true\n</span>NodeFeatureRule <span class=\"s2\">\"examples/nodefeaturerule.yaml\"</span> is valid <span class=\"k\">for </span>NodeFeature <span class=\"s2\">\"examples/nodefeature.yaml\"</span>\n</code></pre> </div></div>\n","dir":"/usage/","name":"kubectl-plugin.md","path":"usage/kubectl-plugin.md","url":"/usage/kubectl-plugin.html"}] |