2021-12-08 14:37:55 +02:00
---
2021-09-23 15:58:45 +03:00
title: "Feature labels"
2020-09-08 20:16:17 +03:00
layout: default
sort: 4
---
2021-09-23 15:58:45 +03:00
# Feature labels
2021-09-27 15:31:49 +03:00
{: .no_toc}
2020-09-08 20:16:17 +03:00
2021-03-09 13:38:09 +02:00
## Table of contents
2021-09-27 15:31:49 +03:00
{: .no_toc .text-delta}
2020-09-08 20:16:17 +03:00
1. TOC
{:toc}
---
2021-09-23 15:58:45 +03:00
Features are advertised as labels in the Kubernetes Node object.
2020-10-20 20:50:46 +03:00
2021-09-23 15:58:45 +03:00
## Built-in labels
2020-10-20 20:50:46 +03:00
2021-09-23 15:58:45 +03:00
Label creation in nfd-worker is performed by a set of separate modules called
label sources. The
[`core.labelSources` ](../advanced/worker-configuration-reference#corelabelsources )
configuration option (or
[`-label-sources` ](../advanced/worker-commandline-reference#-label-sources )
flag) of nfd-worker controls which sources to enable for label generation.
2020-09-08 20:16:17 +03:00
2021-09-23 15:58:45 +03:00
All built-in labels use the `feature.node.kubernetes.io` label namespace and
have the following format.
```plaintext
feature.node.kubernetes.io/< feature > = < value >
```
2020-09-08 20:16:17 +03:00
*Note: Consecutive runs of nfd-worker will update the labels on a
given node. If features are not discovered on a consecutive run, the corresponding
label will be removed. This includes any restrictions placed on the consecutive run,
2021-02-24 14:29:07 +02:00
such as restricting discovered features with the -label-whitelist option.*
2020-09-08 20:16:17 +03:00
### CPU
2021-09-23 15:58:45 +03:00
| Feature name | Value | Description
| ----------------------- | ------------ | -----------
| ** `cpu-cpuid.<cpuid-flag>` ** | true | CPU capability is supported. **NOTE:** the capability might be supported but not enabled.
| ** `cpu-hardware_multithreading` ** | true | Hardware multithreading, such as Intel HTT, enabled (number of logical CPUs is greater than physical CPUs)
| ** `cpu-power.sst_bf.enabled` ** | true | Intel SST-BF ([Intel Speed Select Technology][intel-sst] - Base frequency) enabled
| ** `cpu-pstate.status` ** | string | The status of the [Intel pstate][intel-pstate] driver when in use and enabled, either 'active' or 'passive'.
| ** `cpu-pstate.turbo` ** | bool | Set to 'true' if turbo frequencies are enabled in Intel pstate driver, set to 'false' if they have been disabled.
| ** `cpu-pstate.scaling_governor` ** | string | The value of the Intel pstate scaling_governor when in use, either 'powersave' or 'performance'.
| ** `cpu-cstate.enabled` ** | bool | 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.
| ** `cpu-rdt.<rdt-flag>` ** | true | [Intel RDT][intel-rdt] capability is supported. See [RDT flags ](#intel-rdt-flags ) for details.
| ** `cpu-sgx.enabled` ** | true | Set to 'true' if Intel SGX is enabled in BIOS (based a non-zero sum value of SGX EPC section sizes).
2022-03-28 05:51:23 -04:00
| ** `cpu-model.vendor_id` ** | string | Comparable CPU vendor ID.
| ** `cpu-model.family` ** | int | CPU family.
| ** `cpu-model.id` ** | int | CPU model number.
2021-09-23 15:58:45 +03:00
The CPU label source is configurable, see
[worker configuration ](deployment-and-usage#worker-configuration ) and
[`sources.cpu` ](../advanced/worker-configuration-reference#sourcescpu )
configuration options for details.
#### X86 CPUID flags (partial list)
| Flag | Description |
2020-09-08 20:16:17 +03:00
| --------- | ---------------------------------------------------------------- |
| ADX | Multi-Precision Add-Carry Instruction Extensions (ADX)
| AESNI | Advanced Encryption Standard (AES) New Instructions (AES-NI)
| AVX | Advanced Vector Extensions (AVX)
| AVX2 | Advanced Vector Extensions 2 (AVX2)
2021-09-23 15:58:45 +03:00
By default, the following CPUID flags have been blacklisted: BMI1, BMI2, CLMUL,
CMOV, CX16, ERMS, F16C, HTT, LZCNT, MMX, MMXEXT, NX, POPCNT, RDRAND, RDSEED,
RDTSCP, SGX, SSE, SSE2, SSE3, SSE4, SSE42 and SSSE3. See
[`sources.cpu` ](../advanced/worker-configuration-reference#sourcescpu )
configuration options to change the behavior.
2020-11-30 19:04:31 +02:00
See the full list in [github.com/klauspost/cpuid][klauspost-cpuid].
2021-09-23 15:58:45 +03:00
#### Arm CPUID flags (partial list)
2020-09-08 20:16:17 +03:00
2021-09-23 15:58:45 +03:00
| Flag | Description |
2020-09-08 20:16:17 +03:00
| --------- | ---------------------------------------------------------------- |
| IDIVA | Integer divide instructions available in ARM mode
| IDIVT | Integer divide instructions available in Thumb mode
| THUMB | Thumb instructions
| FASTMUL | Fast multiplication
| VFP | Vector floating point instruction extension (VFP)
| VFPv3 | Vector floating point extension v3
| VFPv4 | Vector floating point extension v4
| VFPD32 | VFP with 32 D-registers
| HALF | Half-word loads and stores
| EDSP | DSP extensions
| NEON | NEON SIMD instructions
| LPAE | Large Physical Address Extensions
2021-09-23 15:58:45 +03:00
#### Arm64 CPUID flags (partial list)
2020-09-08 20:16:17 +03:00
2021-09-23 15:58:45 +03:00
| Flag | Description |
2020-09-08 20:16:17 +03:00
| --------- | ---------------------------------------------------------------- |
| AES | Announcing the Advanced Encryption Standard
| EVSTRM | Event Stream Frequency Features
| FPHP | Half Precision(16bit) Floating Point Data Processing Instructions
| ASIMDHP | Half Precision(16bit) Asimd Data Processing Instructions
| ATOMICS | Atomic Instructions to the A64
| ASIMRDM | Support for Rounding Double Multiply Add/Subtract
| PMULL | Optional Cryptographic and CRC32 Instructions
| JSCVT | Perform Conversion to Match Javascript
| DCPOP | Persistent Memory Support
2021-09-23 15:58:45 +03:00
#### Intel RDT flags
2021-01-21 00:48:40 +01:00
2021-09-23 15:58:45 +03:00
| Flag | Description |
| --------- | ---------------------------------------------------------------- |
| RDTMON | Intel RDT Monitoring Technology
| RDTCMT | Intel Cache Monitoring (CMT)
| RDTMBM | Intel Memory Bandwidth Monitoring (MBM)
| RDTL3CA | Intel L3 Cache Allocation Technology
| RDTl2CA | Intel L2 Cache Allocation Technology
| RDTMBA | Intel Memory Bandwidth Allocation (MBA) Technology
2020-09-08 20:16:17 +03:00
2021-11-26 11:37:47 +02:00
### IOMMU (deprecated)
2020-09-08 20:16:17 +03:00
2021-09-23 15:58:45 +03:00
| Feature | Value | Description
| ------------------- | ----- | -----------
| ** `iommu.enabled` ** | true | IOMMU is present and enabled in the kernel
2020-09-08 20:16:17 +03:00
2021-11-26 11:37:47 +02:00
**DEPRECATED**: The **iommu** source is deprecated and not enabled by default.
2020-09-08 20:16:17 +03:00
### Kernel
2021-09-23 15:58:45 +03:00
| Feature | Value | Description
| ------- | ------ | -----------
| ** `kernel-config.<option>` ** | true | Kernel config option is enabled (set 'y' or 'm'). Default options are `NO_HZ` , `NO_HZ_IDLE` , `NO_HZ_FULL` and `PREEMPT`
| ** `kernel-selinux.enabled` ** | true | Selinux is enabled on the node
| ** `kernel-version.full` ** | string | Full kernel version as reported by `/proc/sys/kernel/osrelease` (e.g. '4.5.6-7-g123abcde')
| ** `kernel-version.major` ** | string | First component of the kernel version (e.g. '4')
| ** `kernel-version.minor` ** | string | Second component of the kernel version (e.g. '5')
| ** `kernel-version.revision` ** | string | Third component of the kernel version (e.g. '6')
2020-09-08 20:16:17 +03:00
2021-09-23 15:58:45 +03:00
The kernel label source is configurable, see
[worker configuration ](deployment-and-usage#worker-configuration ) and
[`sources.kernel` ](../advanced/worker-configuration-reference#sourceskernel )
configuration options for details.
2020-09-08 20:16:17 +03:00
### Memory
2021-09-23 15:58:45 +03:00
| Feature | Value | Description
| ----------- | ----- | -----------
| ** `memory-numa` ** | true | Multiple memory nodes i.e. NUMA architecture detected
| ** `memory-nv.present` ** | true | NVDIMM device(s) are present
| ** `memory-nv.dax` ** | true | NVDIMM region(s) configured in DAX mode are present
2020-09-08 20:16:17 +03:00
### Network
2021-09-23 15:58:45 +03:00
| Feature | Value | Description
| ----------- | ----- | -----------
| ** `network-sriov.capable` ** | true | [Single Root Input/Output Virtualization][sriov] (SR-IOV) enabled Network Interface Card(s) present
| ** `network-sriov.configured` ** | true | SR-IOV virtual functions have been configured
2020-09-08 20:16:17 +03:00
### PCI
2021-09-23 15:58:45 +03:00
| Feature | Value | Description
| ----------- | ----- | -----------
| ** `pci-<device label>.present` ** | true | PCI device is detected
| ** `pci-<device label>.sriov.capable` ** | true | [Single Root Input/Output Virtualization][sriov] (SR-IOV) enabled PCI device present
2020-09-08 20:16:17 +03:00
2021-09-23 15:58:45 +03:00
`<device label>` is format is configurable and set to `<class>_<vendor>` by
default. For more more details about configuration of the pci labels, see
[`sources.pci` ](../advanced/worker-configuration-reference#sourcespci ) options
and [worker configuration ](deployment-and-usage#worker-configuration )
instructions.
2020-09-08 20:16:17 +03:00
### USB
2021-09-23 15:58:45 +03:00
| Feature | Value | Description
| ----------- | ----- | -----------
| ** `usb-<device label>.present` ** | true | USB device is detected
2020-09-08 20:16:17 +03:00
2021-09-23 15:58:45 +03:00
`<device label>` is format is configurable and set to
`<class>_<vendor>_<device>` by default. For more more details about
configuration of the usb labels, see
[`sources.usb` ](../advanced/worker-configuration-reference#sourcesusb ) options
and [worker configuration ](deployment-and-usage#worker-configuration )
instructions.
2020-09-08 20:16:17 +03:00
### Storage
2021-09-23 15:58:45 +03:00
| Feature | Value | Description
| ----------- | ----- | -----------
| ** `storage-nonrotationaldisk` ** | true | Non-rotational disk, like SSD, is present in the node
2020-09-08 20:16:17 +03:00
### System
2021-09-23 15:58:45 +03:00
| Feature | Value | Description
| ----------- | ----- | -----------
| ** `system-os_release.ID` ** | string | Operating system identifier
| ** `system-os_release.VERSION_ID` ** | string |Operating system version identifier (e.g. '6.7')
| ** `system-os_release.VERSION_ID.major` ** | string |First component of the OS version id (e.g. '6')
| ** `system-os_release.VERSION_ID.minor` ** | string | Second component of the OS version id (e.g. '7')
2020-09-08 20:16:17 +03:00
2021-09-23 15:58:45 +03:00
### Custom
2020-10-20 20:50:46 +03:00
2021-09-23 15:58:45 +03:00
The custom label source is designed for creating
[user defined labels ](#user-defined-labels ). However, it has a few statically
defined built-in labels:
2020-10-20 20:50:46 +03:00
2021-09-23 15:58:45 +03:00
| Feature | Value | Description
| ----------- | ----- | -----------
| ** `custom-rdma.capable` ** | true | The node has an RDMA capable Network adapter |
| ** `custom-rdma.enabled` ** | true | The node has the needed RDMA modules loaded to run RDMA traffic |
2020-10-20 20:50:46 +03:00
2021-09-23 15:58:45 +03:00
## User defined labels
2020-09-08 20:16:17 +03:00
2021-09-23 15:58:45 +03:00
NFD has many extension points for creating vendor and application specific
labels. See the [customization guide ](../advanced/customization-guide.md ) for
detailed documentation.
2020-09-08 20:16:17 +03:00
## Extended resources
This feature is experimental and by no means a replacement for the usage of
device plugins.
Labels which have integer values, can be promoted to Kubernetes extended
2021-02-24 14:29:07 +02:00
resources by listing them to the master `-resource-labels` command line flag.
2020-09-08 20:16:17 +03:00
These labels won't then show in the node label section, they will appear only
as extended resources.
An example use-case for the extended resources could be based on a hook which
creates a label for the node SGX EPC memory section size. By giving the name of
2021-02-24 14:29:07 +02:00
that label in the `-resource-labels` flag, that value will then turn into an
2020-09-08 20:16:17 +03:00
extended resource of the node, allowing PODs to request that resource and the
Kubernetes scheduler to schedule such PODs to only those nodes which have a
sufficient capacity of said resource left.
Similar to labels, the default namespace `feature.node.kubernetes.io` is
automatically prefixed to the extended resource, if the promoted label doesn't
have a namespace.
Example usage of the command line arguments, using a new namespace:
2021-02-24 14:29:07 +02:00
`nfd-master -resource-labels=my_source-my.feature,sgx.some.ns/epc -extra-label-ns=sgx.some.ns`
2020-09-08 20:16:17 +03:00
The above would result in following extended resources provided that related
labels exist:
2020-10-20 20:50:46 +03:00
2021-02-25 13:49:02 +02:00
```plaintext
2020-09-08 20:16:17 +03:00
sgx.some.ns/epc: < label value >
feature.node.kubernetes.io/my_source-my.feature: < label value >
```
<!-- Links -->
2020-11-30 19:04:31 +02:00
[klauspost-cpuid]: https://github.com/klauspost/cpuid#x86 -cpu-instructions
2020-09-08 20:16:17 +03:00
[intel-rdt]: http://www.intel.com/content/www/us/en/architecture-and-technology/resource-director-technology.html
[intel-pstate]: https://www.kernel.org/doc/Documentation/cpu-freq/intel-pstate.txt
[intel-sst]: https://www.intel.com/content/www/us/en/architecture-and-technology/speed-select-technology-article.html
[sriov]: http://www.intel.com/content/www/us/en/pci-express/pci-sig-sr-iov-primer-sr-iov-technology-paper.html