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.
No need for that anymore as annotations are used to keep track of labels
managed by nfd. This also makes the feature labels more generic with no
traces of the NFD project name. This makes way for "standardizing" the
node feature labels in a larger architectural scope, in case that was
something that would be pursued in the future.
Add new 'nfd.node.kubernetes.io/feature-labels' annotation to store all
the feature labels added by NFD. This annotation is used by NFD by
cleaning up old labels when doing re-labeling.
In this scheme NFD does not need to rely on NFD-specific prefix in
feature label, and, is always able to reliably clean up old label.
Remove labels in the old, deprecated,
node.alpha.kubernetes-incubator.io namespace. We want clean up the
deprecated labels when deploying new version of NFD.
Add new 'nfd.node.kubernetes.io/version' annotation for advertising the
version of NFD that created the feature labels on the node. Introduces
new 'nfd.node.kubernetes.io' namespace that is supposed to be used by
all future NFD annotations. The old
'node.alpha.kubernetes-incubator.io/node-feature-discovery.version' is
dropped in favor of the new annotation.
Annotations are better suited for this kind of metadata. NFD version
should not be used for pod scheduling, especially because all the nodes
in the cluster should normally run the same version of NFD.
Add a new 'kernel' feature source, detecting the kernel version. The
kernel version is split into multiple labels in order to make this more
usable in label selectors. Kernel version in the format X.Y.Z-patch will
be presented as
node.alpha.kubernetes-incubator.io/nfd-kernel-version.full=X.Y.Z-patch
node.alpha.kubernetes-incubator.io/nfd-kernel-version.major=X
node.alpha.kubernetes-incubator.io/nfd-kernel-version.minor=Y
node.alpha.kubernetes-incubator.io/nfd-kernel-version.revision=Z
The '.full' label will always be avaiable. The other labels if these
components can be parsed from the kernel version number.
User can now configure the list of device classes to detect, either via
a configuration file or by using the --options command line flag.
An example of a command line flag to detect all network controllers and
("main class 0x02) and VGA display controllers ("main" class 0x03 and
subclass 0x00) would be:
--options='{"sources": {"pci": {"deviceClassWhitelist": ["02", "0300"] } } }'
This feature source detects the presence of PCI devices. At the moment,
it only advertises GPUs and accelerator cards, i.e. device classes 0x03,
0x0b40 and 0x12.
The label format is:
node.alpha.kubernetes-incubator.io/nfd-pci-<device label>.present
where <device label> is composed of raw PCI IDs:
<class id>_<vendor id>
Implement new '--options' command line flag that can be used to specify
config options from command line. Options specified via this command
line flag will override those read from the config file. The same format
as in the config file must be used, that is, the flag value must be
valid YAML or JSON.
Support yaml/json based config file for nfd. This commit does not add
any actual consumers for the config file, yet.
By default, nfd tries to read
/etc/kubernetes/node-feature-discovery/node-feature-discovery.conf.
This can be changed by specifying the --config command line flag.
* Arrange feature sources alphabetically
Just a cosmetic change, but, a small readability improvement.
* Implement detection of IOMMU (#136)
Add a new feature source, i.e. 'iommu', which detects if an IOMMU is
present and enabled in the kernel. The new node label is
node.alpha.kubernetes-incubator.io/nfd-iommu-present
* Re-order imports in main.go alphabetically
* Refactor argument parsing
* Run nfd periodically in a loop by default
* Implement --sleep-interval command line option
* Add template for running nfd as a Kubernetes DaemonSet
This commit:
- enables node-feature-dicovery to advertise selinux status
on the node by adding a label.
- update the template to mount /sys into the container, this is
needed to know about the selinux status on the host
- adds selinux source for unit tests
This change adds feature source "storage".
Add label if any non-rotational block device is present in the node.
The label will be: nfd-storage-nonrotationaldisk=true
* Adding SR-IOV capability discovery to node-feature-discovery
* SR-IOV capability discovery in NFD : code update after PR review
- using hostnetwork instead of volume mount in file node-feature-discovery-job.json.template
- iterating through network interfaces that are "up" in sources.go
- inserting logs in sources.go
- change in feature source name from "netid" to "network" in sources.go, README.md and main.go
* Added code for labels sriov=true (sriov_totalvfs > 0) and sriov-configured=true (sriov_numvfs > 0)
* Code Refactored: Added Network package and network.go
Automatic merge from submit-queue
Update published label prefix.
Fixes#27.
- Changed prefix from `node.alpha.intel.com/nfd` to
`node.alpha.kubernetes-incubator.io/nfd`
Adds RemoveLabels() to remove all labels from a node that contains the
supplied search string. Uses this to remove node-feature-discovery
labels prior to re-applying newly discovered labels.
This behavior applies to consecutive runs of node-feature-discovery and
whatever restrictions are placed on it. For example if a whitelist is
specified that changes the labels that are discovered, any labels that
do not match the whitelist will be removed. Adds a small note to the
readme to point out this fact.
Adds tests to main_test.go to test the behavior of AddLabels and
RemoveLabels.
- Added interface FeatureSource, moved cpuid, rdt and pstate
discovery logic into implementations.
- Updated logging output to make it more machine-readable
(one feature, in label-format, per line).
- Normalized label names (derived from the underlying feature source).
- Added makefile.
- Added command-line argument parsing and proper CLI documentation.
- Added ability to filter the enabled feature sources: cpuid,rdt,pstate.
- Added ability to print the software version and exit.
- Added ability to print the CLI help.
- Updated README.
- Updated dep versions.
- Added -s -w to ldflags.
- Output version label along with discovered feature labels.
- Added sources section to README.
- Normalized README link for pstate
- Added git version to published labels.
- Minor formatting fix in job template.
- Added .travis.yml and added build status image link to README.
- Added .gitignore.