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

605 commits

Author SHA1 Message Date
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
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
Markus Lehtonen
e52ec3480f nfd-master: implement --instance flag
This can be used to help running multiple parallel NFD deployments in
the same cluster. The flag changes the node annotation namespace to
<instance>.nfd.node.kubernetes.io allowing different nfd-master intances
to store metadata in separate annotations.
2021-02-10 13:48:31 +02:00
Markus Lehtonen
705687192d nfd-master: make updateNodeFeatures a method of nfdMaster 2021-02-10 13:46:59 +02:00
Markus Lehtonen
cdca6d667a nfd-master: make nodeName non-global 2021-02-10 13:46:59 +02:00
Markus Lehtonen
b146508e64 nfd-master: drop separate labelerServer type
Simplify code by changing nfdMaster to implement LabelerServer interface
by itself.
2021-02-10 13:46:59 +02:00
Kubernetes Prow Robot
01384d434f
Merge pull request #435 from marquiz/fixes/filepath
Replace improper usage of filepath.Join with path.Join
2021-02-10 03:44:59 -08:00
Kubernetes Prow Robot
fbde30a164
Merge pull request #436 from marquiz/devel/golangci-lint
scripts/test-infra: update golangci-lint to v1.36.0
2021-02-10 03:36:59 -08:00
Markus Lehtonen
44b52b69be scripts/test-infra: update golangci-lint to v1.36.0 2021-02-10 12:58:44 +02:00
Markus Lehtonen
76b95b6c55 Replace improper usage of filepath.Join with path.Join
In JSON and kubernetes API object names we want to use slashes instead
of the OS dependent file path separator.
2021-02-10 12:54:31 +02:00
Kubernetes Prow Robot
f0513eeda0
Merge pull request #434 from marquiz/devel/template-auto-update
Change the worker conf update mechanism of templates
2021-02-04 13:20:52 -08:00
Markus Lehtonen
569e0f2017 Change the worker conf update mechanism of templates
Rely on markers instead which makes the update work also in the middle
of a template file. Previously it relied on the configuration data to be
at the very end of the file to be updated.
2021-02-04 18:56:55 +02:00
Kubernetes Prow Robot
5094eadedc
Merge pull request #430 from marquiz/devel/templates-pull-policy
Set imagePullPolicy in the deployment templates to Always
2021-02-03 09:46:28 -08:00
Markus Lehtonen
040604eeb4 Set imagePullPolicy in the deployment templates to Always
Update prepare-release.sh so that the policy will be set to IfNotPresent
for releases.
2021-02-03 18:26:54 +02:00
Kubernetes Prow Robot
4af5311880
Merge pull request #421 from mythi/cpuid-v2.0.1
go.mod: update to klauspost/cpuid/v2@v2.0.2
2020-12-15 06:51:48 -08:00
Mikko Ylinen
07bc50d5a8 go.mod: update to klauspost/cpuid/v2@v2.02
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-12-15 15:56:15 +02:00
Kubernetes Prow Robot
8be8d1b6db
Merge pull request #420 from marquiz/documentation/readme
README: update references to v0.7.0
2020-12-14 11:47:48 -08:00
Markus Lehtonen
5912177a03 README: update references to v0.7.0 2020-12-08 10:25:35 +02:00
Kubernetes Prow Robot
288b1869c1
Merge pull request #419 from marquiz/fixes/gh-pages
github: workflow fixes
2020-12-07 08:39:26 -08:00
Markus Lehtonen
30e3d0b8b9 github: switch to checkout v1
V2 handles tags incorrectly
(https://github.com/actions/checkout/issues/290) and the easiest
solution is to simply switch to v1.
2020-12-07 12:35:05 +02:00
Markus Lehtonen
ee02dd7033 scripts/update-gh-pages: add more details when stopping 2020-12-07 12:34:50 +02:00
Kubernetes Prow Robot
b59293c18b
Merge pull request #416 from ArangoGutierrez/cp-415
Cherry-pick: github: update new-release issue template
2020-12-04 10:15:59 -08:00
Markus Lehtonen
16acc2b433
github: update new-release issue template 2020-12-04 13:00:11 -05:00
Kubernetes Prow Robot
8aa9460e66
Merge pull request #406 from mythi/cpuid-v2.0
go.mod: update klauspost/cpuid
2020-12-04 06:21:59 -08:00
Kubernetes Prow Robot
c624c88b10
Merge pull request #412 from marquiz/devel/prune
Add namespace and RBAC rules to nfd-prune.yaml.template
2020-12-03 05:41:00 -08:00
Kubernetes Prow Robot
24937bbed6
Merge pull request #411 from marquiz/documentation/uninstall
docs: more options in uninstallation instructions
2020-12-03 04:50:59 -08:00
Markus Lehtonen
c7e66d910f Add namespace and RBAC rules to nfd-prune.yaml.template
Makes it possible to run prune on its own. Reflect this change in the
documentation.
2020-12-03 14:41:54 +02:00
Markus Lehtonen
d2bfa3c39b docs: more options in uninstallation instructions 2020-12-03 14:36:42 +02:00
Kubernetes Prow Robot
9ea5329ab6
Merge pull request #409 from marquiz/fixes/gh-pages-2
scripts/update-gh-pages: fix generated commit message
2020-12-03 04:18:59 -08:00
Kubernetes Prow Robot
1d021d02b8
Merge pull request #410 from marquiz/fixes/templates
Fix auto-generation of nfd-prune.yaml
2020-12-03 03:57:00 -08:00
Markus Lehtonen
7cb66bbba1 Fix auto-generation of nfd-prune.yaml
Change the template so that our sed magic updates the container image
name correctly.
2020-12-03 13:34:26 +02:00
Kubernetes Prow Robot
7f5d2390bf
Merge pull request #408 from marquiz/fixes/gh-pages
scripts/update-gh-pages: only update docs if version has been released
2020-12-03 03:01:00 -08:00
Markus Lehtonen
ad042f92f5 scripts/update-gh-pages: only update docs if version has been released
Only update documentation if the version has been released (i.e. a git
tag corresponding the version we're updating exists) or it is for the
master branch. Prevents us from pointing users to documentation of an
unreleased version.

Also updates github workflow to fetch full commit history (including
tags) so that git describe works correctly.
2020-12-03 12:54:14 +02:00
Markus Lehtonen
9d4e89ae8f scripts/update-gh-pages: fix generated commit message 2020-12-03 12:30:37 +02:00
Mikko Ylinen
94f49b9418 go.mod: update klauspost/cpuid
The latest changes in klauspost/cpuid add detection for Sapphire Rapids
new instructions.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-11-30 19:04:41 +02:00
Kubernetes Prow Robot
42d3fa19ef
Merge pull request #404 from ArangoGutierrez/kubeconfig_env_e2e
be a bit more verbose on a required KUBECONFIG env var
2020-11-24 21:16:39 -08:00
Carlos Eduardo Arango Gutierrez
30e64468de
Makefile: require KUBECONFIG to be specified for e2e-test target
This Patch adds a check on make target e2e-test, to check if the
KUBECONFIG env var is set before running the test suite.

if not pressent return a valid error message.

Signed-off-by: Carlos Eduardo Arango Gutierrez <carangog@redhat.com>
2020-11-24 16:50:55 -05:00
Kubernetes Prow Robot
a27a69e452
Merge pull request #405 from marquiz/devel/gitignore
gitignore: add bin/
2020-11-24 11:46:40 -08:00
Markus Lehtonen
5528387bc4 gitignore: add bin/ 2020-11-24 21:23:15 +02:00
Kubernetes Prow Robot
a0f59ef22f
Merge pull request #336 from marquiz/devel/122
nfd-master: patch node object instead of rewriting it
2020-11-24 04:51:00 -08:00
Markus Lehtonen
19b8f2cd3d nfd-master: more detailed unit testing of extended resources 2020-11-24 12:45:06 +02:00
Markus Lehtonen
d17743a0b9 nfd-master: handle label annotations in the same func
Handle both creation and parsing of the "feature-labels" and
"extended-resources" annotations in the function. I think this is more
logical to keep them together.
2020-11-24 12:45:06 +02:00
Markus Lehtonen
95ff300d74 nfd-master: patch node object instead of rewriting it
When updating node labels and annotations use JSON patches instead of
doing a read-modify-write on the whole node object. Patching is already
being used in managing extended resources so some of the existing code
was re-usable.

This patch should mitigate the problem of node update failures caused by
race conditions (a change in the node object between our read and write)
resulting e.g. in errors/restarts in nfd worker pods.
2020-11-24 12:45:06 +02:00