1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00
Commit graph

105 commits

Author SHA1 Message Date
Kubernetes Prow Robot
208e1bc99e
Merge pull request from mythi/sriov
pci: add sriov.capable attribute
2020-02-19 00:50:24 -08:00
Mikko Ylinen
24c3a98303 pci: add sriov.capable attribute
SR-IOV is a PCI attribute and also non-NIC PCI devices can have it. Therefore,
it is useful to label all PCI devices with that capability.

After this commit the following labels for Intel NICs are overlapping:
feature.node.kubernetes.io/pci-0200_8086.sriov.capable=true
feature.node.kubernetes.io/network-sriov.capable=true

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-02-18 20:09:32 +02:00
Markus Lehtonen
b7cc69fc80 README: better document the usage of hooks and feature files
Mention supported runtimes that the hooks can use and describe how hooks
and feature files can be used for injecting labels from other pods.
2020-02-14 14:05:17 +02:00
Markus Lehtonen
66bf544ac5 README: note on avoiding a race condition with hooks 2020-02-11 14:31:10 +02:00
Markus Lehtonen
789a0073a6 Refer to v0.5.0 release in README and the deployment templates 2019-11-22 11:18:34 +02:00
Markus Lehtonen
882bbeea3f source/cpu: support 'false' status of cpu-pstate.turbo
Some workloads may benefit from Intel Turbo Boost technology being
disabled. This patch sets the
'feature.node.kubernetes.io/cpu-pstate.turbo' label to 'false' if we can
detect that it has been disabled. If detection fails no label is
published.
2019-08-29 16:18:12 +03:00
Victor Morales
b45d0052e9 Fix typo in README.md 2019-08-22 00:18:04 -07:00
Markus Lehtonen
f3c74b6534 README: add separate section about testing 2019-06-27 21:27:48 +03:00
Markus Lehtonen
b5d71f421d Makefile: add 'e2e-test' target
For running end-to-end tests it is required to explicitly specify in the
command line the kubeconfig to be used, e.g.:
$ make e2e-test KUBECONFIG=$HOME/.kube/config
2019-06-27 06:29:45 +03:00
Markus Lehtonen
2cfb3ade5d Makefile: add IMAGE_BUILD_EXTRA_OPTS variable 2019-06-18 16:23:25 +03:00
Markus Lehtonen
a8e7259bf8 Makefile: add 'push' target
Now 'make push' can be used to push the container image to the remote
registry.
2019-06-18 16:23:25 +03:00
Markus Lehtonen
012f7e4946 source/memory: detect NVDIMM DAX mode
Extend NVDIMM (non-volatile DIMM) discovery by adding detection of DAX
mode, i.e. detection of regions in DAX/AppDirect mode.
The new label is:
    feature.node.kubernetes.io/memory-nv.dax: true
2019-06-11 09:58:30 +03:00
Antti Kervinen
9b96407b26 Makefile: create default yamls, configurable namespace
- Create default yamls for deploying master and worker.
- Use kube-system namespace by default.
- Configurable namespace:
  make IMAGE_REGISTRY=myhost:5000 K8S_NAMESPACE=my-nfd-devel
2019-06-05 13:13:53 +03:00
Markus Lehtonen
fa47b0178d Use v0.4.0 release in README and deployment templates and script
Also, slightly adjust the deployment instructions in README to point out
that the templates should now be usable as is to run the latest released
version of NFD.
2019-05-21 11:19:30 +03:00
Markus Lehtonen
4977c66610 README: update the outdated usage demo 2019-05-20 18:02:39 +03:00
Markus Lehtonen
ab094c3ddf README: miscellaneous corrections 2019-05-17 11:42:36 +03:00
Markus Lehtonen
a4375327de Change the sed delimiter in deployment instructions
The former usage of slash as a delimiter did not play well together
with container image tags that usually contain slashes themselves.
2019-05-14 21:15:01 +03:00
Kubernetes Prow Robot
8996be7e09
Merge pull request from Ethyling/change-label-prefix
Allow to change labels namespace
2019-05-14 07:43:13 -07:00
Markus Lehtonen
7c5f7d600e source/cpu: make cpuid configurable
Add 'cpuid/attributeBlacklist' and 'cpuid/attributeWhitelist' config
options for the cpu feature source. These can be used to filter the set
of cpuid capabilities that get published. The intention is to reduce
clutter in the NFD label space, getting rid of "obvious" or misleading
cpuid labels. Whitelisting has higher priority, i.e.  only whitelist
takes effect if both attributeWhitelist and attributeBlacklist are
specified.
2019-05-13 17:17:02 +03:00
Kubernetes Prow Robot
1752bb3e56
Merge pull request from marquiz/devel/readme
Better document the difference between latest release and master branch
2019-05-10 13:16:20 -07:00
Markus Lehtonen
a0fb0c6561 Better document the difference between latest release and master branch
Point to the latest release in the README, and, point out that a
user-built custom image is required to run the latest development
version. Update the deployment instructions to reflect the need to
specify the container image when using the deployment spec template(s).
Also, update the Job deployment script to set a user-defined container
image.
2019-05-10 15:17:31 +03:00
Jordan Jacobelli
40918827f6
Allow to change labels namespace
The aim here is to allow to override the default namespace
of NFD. The allowed namespaces are whitelisted.
See https://github.com/kubernetes-sigs/node-feature-discovery/issues/227

Signed-off-by: Jordan Jacobelli <jjacobelli@nvidia.com>
2019-05-09 13:17:52 -07:00
Markus Lehtonen
655f5c5555 sources: move all cpu related features under the cpu source
Remove 'cpuid', 'pstate' and 'rdt' feature sources and move their
functionality under the 'cpu' source. The goal is to have a more
systematic organization of feature sources and labels. After this change
we now basically have one source per type of hw, one for kernel and one
for userspace sw.

Related feature labels are changed, correspondingly, new labels being:
    feature.node.k8s.io/cpu-cpuid.<cpuid flag>
    feature.node.k8s.io/cpu-pstate.turbo
    feature.node.k8s.io/cpu-rdt.<rdt feature>
2019-05-09 20:18:36 +03:00
Markus Lehtonen
a704321873 README: fix two outdated hyperlinks 2019-05-08 14:45:25 +03:00
Markus Lehtonen
e7d272ad0f Makefile: reorganise container image variables
Change the structure and naming of the make variables that control the
container image name/tag that gets created. Default values and behavior
stay the same, but, this change tries to make it easier to customize the
build from command line.

Also, document all the relevant make variables in readme.
2019-04-25 15:25:49 +03:00
Markus Lehtonen
61ffd260bb README: move description of hooks to the end of the feature source list
Move the documentation of the feature detection hooks (i.e. 'local'
feature source) after all other feature sources. It is a more logical
place to document custom user-specific functionality after the built-in
features. Also, adjust the title a bit.
2019-04-25 15:24:56 +03:00
Jordan Jacobelli
5df5e5c187 Mount source.d and features.d in template YAMLs
Signed-off-by: Jordan Jacobelli <jjacobelli@nvidia.com>
2019-04-22 10:07:23 -07:00
Markus Lehtonen
ad17e5088b source/cpu: detect SST-BF
Detect of the Intel SST-BF (Speed Select Technology - Base Frequency)
has been enabled.

Adds one new feature label:
  feature.node.kubernetes.io/cpu-power.sst_bf.enabled=true

Based on a patch from kuralamudhan.ramakrishnan@intel.com
2019-04-12 15:11:55 +03:00
Markus Lehtonen
c107284cc5 README: align documentation with master-worker architecture 2019-04-04 22:40:24 +03:00
Jordan Jacobelli
00f96c69d7 Allow to get labels by reading files in local source
The aim here is to add another way to specify labels using the local
source by reading files in a specific directory. That avoids us to
execute a hook when we just need to get the content of a file.
See https://github.com/kubernetes-sigs/node-feature-discovery/issues/226

Signed-off-by: Jordan Jacobelli <jjacobelli@nvidia.com>
2019-04-03 09:26:40 -07:00
Markus Lehtonen
3e8217e9ef source/memory: detect presence of NVDIMM devices
Add a new (binary) label indicating the presence of non-volatile DIMM
devices:
  feature.node.kubernetes.io/memory-nv.present
2019-03-19 09:38:30 +02:00
Markus Lehtonen
b0e368fafc README: minor correction of wording 2019-02-13 21:00:45 +02:00
Markus Lehtonen
db622683db README: document pstate feature source 2019-02-13 20:59:33 +02:00
Markus Lehtonen
8a34a40a6d README: minor corrections to pci feature label description 2019-02-13 20:58:50 +02:00
Markus Lehtonen
5b38896ea0 README: add 'pci' to the list of detected features 2019-02-13 20:58:50 +02:00
Markus Lehtonen
af22702b93 source/system: advertise major and minor OS version
Add two new attributes 'VERSION_ID.major' and 'VERSION_ID.minor' to the
os_release feature. These represent the first two components of
the OS version (version components are assumed to be separated by a
dot). E.g. if VERSION_ID would be 1.2.rc3 major and minor versions would
be 1 and 2, respectively:
  feature.node.kubernetes.io/system-os_release.VERSION_ID=1.2.rc3
  feature.node.kubernetes.io/system-os_release.VERSION_ID.major=1
  feature.node.kubernetes.io/system-os_release.VERSION_ID.minor=2

The version components must be purely numerical in order for them to be
advertised. This way they can be fully (and reliably) utilized in
nodeAffinity, including relative (Gt and Lt) operators.
2019-02-13 20:45:13 +02:00
Dmitry Kozlov
fcb530c19e Update README.md 2019-02-13 09:06:08 +02:00
Markus Lehtonen
2c5145aa06 README: improve documentation of local hooks
Add a paragraph about hook config files.
2019-01-25 13:54:28 +02:00
Markus Lehtonen
e8249e6fa3 Move selinux detection to kernel feature source
Remove the 'selinux' feature source and move the functionality under the
'kernel' feature source. The selinux feature label is changed to
  feature.node.kubernetes.io/selinux.enabled

The selinux feature source was rather narrow in scope, and, the sole
feature it advertised naturally falls under the kernel feature source.
2019-01-03 10:08:28 +02:00
Markus Lehtonen
da2cb07c64 Implement cpu feature source
Currently, it only detects one feature, i.e. hardware multithreading
(such as Intel hyper-threading technology). The corresponding feature
label is:
  feature.node.kubernetes.io/cpu-hardware_multithreading=true

However, this (architecture/platform dependent) feature is not detected
directly, and, the heuristics can be mislead. Detection works by
checking the thread siblings of each logical (and online) cpu in the
system. If any cpu has any thread siblings the feature label is set to
true. Thus, hardware multithreading could be effectively disabled e.g.
by putting all sibling cpus offline (even if the technology would be
enabled in hardware).
2018-12-07 16:58:09 +02:00
Markus Lehtonen
649d8a3ae1 Implement OS release detection
Implement new 'system' feature source. It now detects OS release
information from the os-release file, assumed to be available at
/host-etc/os-release. It currently creates two labels (assuming that the
corresponding fields are found in the os-release file), with example
values:
  feature.node.kubernetes.io/system-os_release.ID=opensuse
  feature.node.kubernetes.io/system-os_release.VERSION_ID=42.3

Also, update the template spec to mount /etc/os-release file from the
host inside the container.
2018-12-05 14:42:38 +02:00
Markus Lehtonen
6f6deb6263 Refer to kubernetes-sigs in the documentation
Change links in README.md and RELEASE.md to point to the new repo
location under kubernetes-sigs. Also, remove some outdated references to
kubernetes incubator project.
2018-12-04 15:17:56 +02:00
Markus Lehtonen
a7764bfc82 Remove references to nfd version label from README
Annotations are used for this information, instead.
2018-12-04 15:13:12 +02:00
Markus Lehtonen
a1e60ba92b Remove 'nfd' label prefix from README and demos, too 2018-12-04 15:13:12 +02:00
Markus Lehtonen
4053010dd9 Make the kernel feature source configurable
Adding two config options:
- kernel config file to read
- kconfig options that are detected
2018-12-04 09:34:56 +02:00
Markus Lehtonen
ce129aef88 Implement kernel config detection
This implementation only detects kconfig options ("NO_HZ", "NO_HZ_IDLE",
"NO_HZ_FULL" and "PREEMPT"). The corresponding node labels will be
  node.alpha.kubernetes-incubator.io/nfd-kernel-config.<option name>

Currently, only bool and tristate (i.e. '=y' or '=m') kernel config
options are supported. Other kconfig types (e.g. string or int) are
simply ignored. If the kconfig flag is set to '=y' or '=m', the
corresponding node label will be present and it's value will be 'true'.
2018-12-04 09:34:56 +02:00
Markus Lehtonen
5af04ca3f6 source/local: allow full control of label name
Make it possible for the hooks to fully define the label name to be used
(i.e. without the '<hook name>-' prefix) by prefixing the printed
feature names with a slash ('/'). This makes it possible to e.g.
override labels create by other sources.

For example having the following output from a hook:
/override_source-override_bool
/override_source-override_value=my value

will translate into the following feature labels:
feature.node.kubernetes.io/override_source-override_bool = true
feature.node.kubernetes.io/override_source-override_value = my value
2018-11-30 11:51:41 +02:00
Markus Lehtonen
4b066ed815 source/local: support non-binary labels
Make the feature detector hooks, run by the 'local' feature source,
support non-binary label values. Hooks can advertise non-binary value by
using <name>=<value> format.

For example, /etc/kubernetes/node-feature-discovery/source.d/myhook
having the following stdout:
LABEL_1
LABEL_2=foobar

Would translate into the following labels:
feature.node.kubernetes.io/myhook-LABEL_1 = true
feature.node.kubernetes.io/myhook-LABEL_2 = foobar
2018-11-30 11:51:41 +02:00
Markus Lehtonen
a84b5c9d82 Support feature detector hooks
Implement a new feature source named 'local' whose only purpose is to
run feature source hooks found under
/etc/kubernetes/node-feature-discovery/source.d/ It tries to execute all
files found under the directory, in alphabetical order.

This feature source provides users a mechanism to implement custom
feature sources in a pluggable way, without modifying nfd source code or
Docker images.

The hooks are supposed to print all discovered features in stdout, one
feature per line. The output in stdout is used in the node label as is.
Full node label name will have the following format:
  feature.node.kubernetes.io/<hook name>-<feature name>
Stderr from the hooks is propagated to nfd log.
2018-11-30 11:51:41 +02:00
Markus Lehtonen
2cefd312a8 Change label namespace to feature.node.kubernetes.io 2018-11-30 09:56:31 +02:00