1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-15 17:50:49 +00:00
Commit graph

646 commits

Author SHA1 Message Date
Markus Lehtonen
5e6f0779e9 nfd-worker: stop masking crashes in feature discovery
The code should be stable enough. If there are fatal bugs causing the
discovery to panic/segfault that should be made visible instead of
semi-siently hiding it. Also, this caused one (negative) test case to
fail undetected which is now fixed.
2021-03-01 09:14:19 +02:00
Kubernetes Prow Robot
e370429970
Merge pull request #455 from marquiz/devel/helm-lint
scripts/test-infra: enable helm linting
2021-02-28 00:22:45 -08:00
Markus Lehtonen
34cc407dd9 scripts/test-infra: enable helm linting 2021-02-26 07:24:59 +02:00
Kubernetes Prow Robot
14dc2b032a
Merge pull request #453 from marquiz/fixes/klog
Logging fixes
2021-02-25 09:03:24 -08:00
Kubernetes Prow Robot
b6d7018d2a
Merge pull request #452 from marquiz/fixes/e2e-openshift
test/e2e: make openshift bits optional
2021-02-25 08:45:25 -08:00
Markus Lehtonen
ed722d5527 nfd-worker: change Fatal* log messages to Exit*
We don't want to always print backtraces.
2021-02-25 18:23:47 +02:00
Markus Lehtonen
73bea99c34 nfd-master: drop last remnants of log package 2021-02-25 18:23:12 +02:00
Markus Lehtonen
7e6f740c9f test/e2e: make openshift bits optional
Only enabled if OPENSHIFT is specified in the environment when running
make e2e-test, for example:

  $ OPENSHIFT=y make e2e-test
2021-02-25 17:54:07 +02:00
Kubernetes Prow Robot
3d5c1a18a2
Merge pull request #450 from marquiz/devel/klog-worker
nfd-worker: switch to klog
2021-02-25 06:35:25 -08:00
Markus Lehtonen
3f18e880b4 nfd-worker: dynamic configuration of klog
Make it possible to dynamically (at run-time) alter most of the logging
configuration from the config file.
2021-02-25 16:10:43 +02:00
Markus Lehtonen
7da7fde8f6 nfd-worker: switch to klog
Greatly expands logging capabilities and flexibility with verbosity
options, among other things.
2021-02-25 16:10:43 +02:00
Kubernetes Prow Robot
efa74905ba
Merge pull request #445 from marquiz/devel/klog
nfd-master: switch to klog
2021-02-25 05:43:25 -08:00
Kubernetes Prow Robot
653ed22f0b
Merge pull request #451 from marquiz/devel/mdlint
docs: enable markdown linting
2021-02-25 05:27:24 -08:00
Markus Lehtonen
3886cfb99e docs: fix mdlint issues 2021-02-25 15:13:40 +02:00
Markus Lehtonen
bc289d0783 docs: enable markdown linting 2021-02-25 15:13:40 +02:00
Markus Lehtonen
3ffb7b8fc5 nfd-master: switch to klog 2021-02-25 07:50:37 +02:00
Kubernetes Prow Robot
a8232ccd2b
Merge pull request #449 from marquiz/documentation/flags
docs: align docs with the single-dash command line flags
2021-02-24 12:08:40 -08:00
Markus Lehtonen
7c9943e634 docs: align docs with the single-dash command line flags
After moving to the flags package for command line argument parsing NFD
accepts command line arguments (flags) starting with a single dash (e.g.
-no-publish in addition to --no-publish). Even if double-dash can be
used the single-dash version is printed e.g. in the usage string (from
-h, -help) so align documentation with that.
2021-02-24 21:31:07 +02:00
Kubernetes Prow Robot
d36500789e
Merge pull request #429 from slintes/configmap-hostname-labels
Added nodename rule to custom source
2021-02-24 09:20:50 -08:00
Marc Sluiter
7038e49d02
source/custom: Add nodename rule
There are cases when the only available metadata for discovering
features is the node's name. The "nodename" rule extends the custom
source and matches when the node's name matches one of the given
nodename regexp patterns.
It is also possible now to set an optional "value" on custom rules,
which overrides the default "true" label value in case the rule matches.
In order to allow more dynamic configurations without having to modify
the complete worker configuration, custom rules are additionally read
from a "custom.d" directory now. Typically that directory will be filled
by mounting one or more ConfigMaps.

Signed-off-by: Marc Sluiter <msluiter@redhat.com>
2021-02-24 16:26:35 +01:00
Kubernetes Prow Robot
5697bffd2c
Merge pull request #444 from marquiz/devel/flags
Switch to flags package in command line arg parsing
2021-02-24 06:42:50 -08:00
Markus Lehtonen
3fd61eacdb nfd-worker: switch to flag in command line parsing 2021-02-24 12:06:16 +02:00
Markus Lehtonen
47033db9c1 nfd-master: use flag for command line parsing 2021-02-24 12:06:16 +02:00
Kubernetes Prow Robot
a7d0439af6
Merge pull request #447 from e0ne/master-tpl-fix
Fix NFD master chart template
2021-02-24 01:12:50 -08:00
Kubernetes Prow Robot
97ca810d5a
Merge pull request #446 from marquiz/fixes/template
Fix daemonset deployment template
2021-02-23 05:22:03 -08:00
Ivan Kolodyazhny
c13af4d235 Fix NFD master chart template
Commit 88bd80d415 introduces error
in template due to the bad formatting. This commit fixes it.
2021-02-23 12:59:49 +02:00
Markus Lehtonen
c899d69459 Fix daemonset deployment template
Remove incorrect tolerations that accidentally crept in with the helm
charts and break the deployment.
2021-02-23 10:07:10 +02:00
Kubernetes Prow Robot
accb986418
Merge pull request #443 from e0ne/instance-chart-support
Add NFD master '--instance' flag support to Helm chart
2021-02-22 05:21:42 -08:00
Ivan Kolodyazhny
88bd80d415 Add NFD master '--instance' flag support to Helm chart 2021-02-21 09:45:20 +02:00
Kubernetes Prow Robot
3e00bfb2ae
Merge pull request #423 from adrianchiris/add-helm-chart
Add helm chart for NFD
2021-02-18 09:04:51 -08:00
Adrian Chiris
e80900b8ee Add helm chart for NFD
This commit adds Helm chart for node-feature-discovery

Signed-off-by: Adrian Chiris <adrianc@nvidia.com>
Signed-off-by: Ivan Kolodiazhnyi <ikolodiazhny@nvidia.com>
2021-02-18 17:19:09 +02:00
Kubernetes Prow Robot
ee16c19b14
Merge pull request #433 from marquiz/devel/config-core
nfd-worker: add core config
2021-02-17 13:10:51 -08:00
Markus Lehtonen
6b744d4179 nfd-worker: extend unit test coverage of config handling
Add test cases for verifying the core config.

Also, add asynchronous tests for basic verification of dynamic config
file updates.
2021-02-17 21:52:25 +02:00
Markus Lehtonen
2b24ed2c18 nfd-worker: implement Stop() method 2021-02-17 21:50:58 +02:00
Markus Lehtonen
278ccdb997 source/fake: make the fake source configurable
Enables more flexible testing.
2021-02-17 21:50:58 +02:00
Markus Lehtonen
d761bc4fcd docs: update documentation regarding configuration
Publish an incomplete version of the NFD Worker Configuration File
Reference, currently covering only the newly added 'core' configuration
flags.
2021-02-17 21:42:52 +02:00
Markus Lehtonen
c2c9dff724 nfd-worker: bail out on invalid config file
Changes the behaviour so that if the specified configuration file exists
it must be valid. Error out at startup if the config is invalid.
Similarly, exit with an error at runtime if the config file becomes
invalid. Bailing out, instead of just printing an error, was a
deliberate choice in order to make configuration mistakes evident.

Having no configuration file is tolerated, however. If the specified
configuration file does not exists nfd-worker resorts to default
settings.
2021-02-17 21:42:50 +02:00
Markus Lehtonen
7e88f00e05 nfd-worker: add core.sources config option
Add a config file option for controlling the enabled feature sources,
aimed at replacing the --sources command line flag which is now marked
as deprecated. The command line flag takes precedence over the config
file option.
2021-02-17 21:36:20 +02:00
Markus Lehtonen
ed177350fc nfd-worker: add core.labelWhiteList config option
Add a config file option for label whitelisting. Deprecate the
--label-whitelist command line flag. Note that the command line flag has
higher priority than the config file option.
2021-02-17 21:35:44 +02:00
Markus Lehtonen
d1d8de944e nfd-worker: add core.sleepInterval config option
Add a new config file option for (dynamically) controlling the sleep
interval. At the same time, deprecate the --sleep-interval command line
flag. The command line flag takes precedence over the config file option.
2021-02-17 21:35:13 +02:00
Markus Lehtonen
e6bdc17d8c nfd-worker: add core config
Allows dynamic (re-)configuration of most nfd-worker options. The goal
is to have most configuration parameters specified in the configuration
file and deprecate most of the command line flags. The priority is
intended to be such that command line flags override whatever is
specified in the configuration file. Thus, specifying something on the
command line effectively disables dynamic configurability of that
parameter.

This patch adds core.noPublish config file option to demonstrate how the
new mechanism is supposed to work. The --no-publish command line flag
takes precedence over this config file option.
2021-02-17 21:35:12 +02:00
Kubernetes Prow Robot
2960f63ae5
Merge pull request #441 from adrianchiris/add-reviewer
Update OWNERS file
2021-02-16 00:45:06 -08:00
Adrian Chiris
59cc16cbae Update OWNERS file
This commit proposes to add github user adrianchiris (me)
as reviewer to NFD.

I have been involved in several contributions to the project
as well as participation in code reviews and issues.

So, i propose to formalize this in the projects OWNERs file

Signed-off-by: Adrian Chiris <adrianc@nvidia.com>
2021-02-15 12:10:51 +00:00
Kubernetes Prow Robot
85bde7f749
Merge pull request #431 from marquiz/devel/master-instance-flag
nfd-master: implement --instance flag
2021-02-11 02:40:15 -08:00
Kubernetes Prow Robot
a8c7135eda
Merge pull request #432 from marquiz/devel/config-watch
nfd-worker: use fsnotify for watching for config file changes
2021-02-11 02:14:15 -08:00
Kubernetes Prow Robot
f4c928671c
Merge pull request #438 from ArangoGutierrez/1924426
Update gogo/protobuf and golang.org/x/text
2021-02-10 13:34:16 -08:00
Carlos Eduardo Arango Gutierrez
89e6a9104f
Update gogo/protobuf and golang.org/x/text
Why:

- CVE-2020-28851
- CVE-2021-3121

Signed-off-by: Carlos Eduardo Arango Gutierrez <carangog@redhat.com>
2021-02-10 16:13:51 -05:00
Markus Lehtonen
29910464a0 nfd-worker: always re-label after a re-config event
Always do re-discovery and re-labeling after a configuration file
change. his way the new config comes into effect immediately, even if
the sleep interval is long (or infinite) # Please enter the commit
message for your changes. Lines starting
2021-02-10 22:09:27 +02:00
Markus Lehtonen
b6ff514853 nfd-worker: use fsnotify for watching for config file changes
Add support for detecting configuration file changes via file system
notifications (fsnotify). Watches are added for the whole directory
chain (up to root directory) so that all changes (even directory
renames) affecting the given configuration file path are captured.

Previously dynamic (re-)configuration of nfd-worker was implemented by
(re-)reading the configuration file on every labeling pass. This was
simple and effective, even if a bit wasteful. However, it didn't provide
asynchronous configuration updates that will be required for e.g.
controlling the "sleep-interval" parameter dynamically which will be
implemented by later patches.
2021-02-10 22:09:27 +02:00
Markus Lehtonen
6958a6677f nfd-worker: use timer channel for sleep interval 2021-02-10 22:09:27 +02:00