2021-12-01 14:46:56 +00:00
|
|
|
[{"layout":"default","title":null,"content":"--\ntitle: \"Feature discovery\"\nlayout: default\nsort: 4\n---\n\n# Feature discovery\n{: .no_toc}\n\n## Table of contents\n{: .no_toc .text-delta}\n\n1. TOC\n{:toc}\n\n---\n\nFeature discovery in nfd-worker is performed by a set of separate modules\ncalled feature sources. Most of them are specifically responsible for certain\ndomain of features (e.g. cpu). In addition there are two highly customizable\nfeature sources that work accross the system.\n\n## Feature labels\n\nEach discovered feature is advertised a label in the Kubernetes Node object.\nThe published node labels encode a few pieces of information:\n\n- Namespace\n - all built-in labels use `feature.node.kubernetes.io`\n - user-specified custom labels ([custom](#custom) and\n [local](#local--user-specific-features) feature sources)\n - `feature.node.kubernetes.io` and `profile.node.kubernetes.io` plus their\n sub-namespaces (e.g. `vendor.profile.node.kubernetes.io` and\n `sub.ns.profile.node.kubernetes.io`) are allowed by default\n - additional namespaces may be enabled with the\n [`-extra-label-ns`](../advanced/master-commandline-reference#-extra-label-ns)\n command line flag of nfd-master\n- The source for each label (e.g. `cpu`).\n- The name of the discovered feature as it appears in the underlying\n source, (e.g. `cpuid.AESNI` from cpu).\n- The value of the discovered feature.\n\nFeature label names adhere to the following pattern:\n\n```plaintext\n<namespace>/<source name>-<feature name>[.<attribute name>]\n```\n\nThe last component (i.e. `attribute-name`) is optional, and only used if a\nfeature logically has sub-hierarchy, e.g. `sriov.capable` and\n`sriov.configure` from the `network` source.\n\nThe `-sources` flag controls which sources to use for discovery.\n\n*Note: Consecutive runs of nfd-worker will update the labels on a\ngiven node. If features are not discovered on a consecutive run, the corresponding\nlabel will be removed. This includes any restrictions placed on the consecutive run,\nsuch as restricting discovered features with the -label-whitelist option.*\n\n## Feature sources\n\n### CPU\n\nThe **cpu** feature source supports the following labels:\n\n| Feature name | Attribute | Description |\n| ----------------------- | ------------------ | ----------------------------- |\n| cpuid | <cpuid flag> | CPU capability is supported\n| hardware_multithreading | | Hardware multithreading, such as Intel HTT, enabled (number of logical CPUs is greater than physical CPUs)\n| power | sst_bf.enabled | Intel SST-BF ([Intel Speed Select Technology][intel-sst] - Base frequency) enabled\n| [pstate][intel-pstate] | status | The status of the Intel pstate driver when in use and enabled, either 'active' or 'passive'.\n| | turbo | Set to 'true' if turbo frequencies are enabled in Intel pstate driver, set to 'false' if they have been disabled.\n| | scaling_governor | The value of the Intel pstate scaling_governor when in use, either 'powersave' or 'performance'.\n| cstate | enabled | 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.\n| [rdt][intel-rdt] | RDTMON | Intel RDT Monitoring Technology\n| | RDTCMT | Intel Cache Monitoring (CMT)\n| | RDTMBM | Intel Memory Bandwidth Monitoring (MBM)\n| | RDTL3CA | Intel L3 Cache Allocation Technology\n| | RDTL2CA | Intel L2 Cache Allocation Technology\n| | RDTMBA | Intel Memory Bandwidth Allocation (MBA) Technology\n| sgx | enabled | Set to 'true' if Intel SGX is enabled in BIOS (based a non-zero sum value of SGX EPC section sizes).\n\nThe (sub-)set of CPUID attributes to publish is configurable via the\n`attributeBlacklist` and `attributeWhitelist` cpuid options of the cpu source.\nIf whitelist is specified, only whitelisted attributes will be published. With\nblacklist, only blacklisted attributes are filtered out. `attributeWhitelist`\nhas priority over `attributeBlacklist`. For examples and more information\nabout configurability, see\n[configuration](deployment-and-usage#worker-co
|