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

8 commits

Author SHA1 Message Date
Markus Lehtonen
a2b9df5cd3 nfd-worker: rework configuration handling
Extend the FeatureSource interface with new methods for configuration
handling. This enables easier on-the fly reconfiguration of the
feature sources. Further, it simplifies adding config support to feature
sources in the future. Stub methods are added to sources that do not
currently have any configurability.

The patch fixes some (corner) cases with the overrides (--options)
handling, too:
- Overrides were not applied if config file was missing or its parsing
  failed
- Overrides for a certain source did not have effect if an empty config
  for the source was specified in the config file. This was caused by
  the first pass of parsing (config file) setting a nil pointer to the
  source-specific config, effectively detaching it from the main config.
  The second pass would then create a new instance of the source
  specific config, but, this was not visible in the feature source, of
  course.
2020-05-21 00:59:37 +03:00
Markus Lehtonen
67d7887949 source: perform all sysfs discovery under host sysfs
Be consistent and do all sysfs based feature discovery under the same
sysfs directory.
2020-05-20 22:15:41 +03:00
Markus Lehtonen
0c8fe34163 Drop glog based logging
Simplify logging of feature sources. Glog was used in some feature
sources, but, it was too complicated for the simple logging needs of
NFD.
2019-04-25 17:14:58 +03:00
Markus Lehtonen
47a97db35a Import from sigs.k8s.io/node-feature-discovery 2018-12-04 15:15:46 +02:00
Markus Lehtonen
56c2ab3d58 Support for non-binary labels
Make it possible to advertise also other than simple 'true' values for
feature labels.
2018-10-10 13:21:49 +03:00
Markus Lehtonen
4fa7ae38e3 network: rename sriov labels
Introduce a new scheme where features may have logical sub-components.
Rename sriov labels from the network source according to the new
pattern:
  sriov            -> sriov.capable
  sriov-configured -> sriov.configured

Also, document this new labeling scheme in the README.

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
2018-10-03 15:25:58 +03:00
Olev Kartau
15559903a0 Improve GoReportCard metrics, both gofmt and golint (#90)
* Format main,fake,network go source to improve GoReportCard

Order of import changed in main.go and network.go,
missing ending newline added in fake.go

* Fixed simple golint suggestions in multiple files

Mostly about missing or incomplete comments
2018-03-05 07:51:47 -08:00
swatisehgal
41da99a435 Adding SR-IOV capability discovery to node-feature-discovery (#49)
* 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
2017-11-28 15:47:11 +01:00