Kubernetes Prow Robot
deabea8b9f
Merge pull request #692 from marquiz/devel/fake-feature-source
...
source/fake: implement FeatureSource
2021-12-07 06:10:01 -08:00
Markus Lehtonen
82e14300a4
source/fake: implement FeatureSource
...
Makes it possible to create fake features for custom rules, enabling
testing.
2021-12-07 10:34:41 +02:00
Markus Lehtonen
969151e1b8
source/fake: drop stale Configure() method
...
Also correct some comments.
2021-12-07 10:34:41 +02:00
Kubernetes Prow Robot
cd374dcd7b
Merge pull request #691 from marquiz/devel/source-test
...
source: make per-source unit tests stricter
2021-12-06 10:43:34 -08:00
Kubernetes Prow Robot
6071b04370
Merge pull request #605 from marquiz/devel/feature-source-config-flag
...
nfd-worker: add core.featureSources config option
2021-12-03 06:22:28 -08:00
Markus Lehtonen
a5e2d4ca16
source: make per-source unit tests stricter
...
Now the tests check that GetLabels() works even without calling
Discover() at all.
2021-12-03 10:26:26 +02:00
Markus Lehtonen
3468e65387
test/e2e: revise usage of nfd command line flags
...
Use the "single-dash" notation of flags and replace deprecated -sources
with -label-sources.
2021-12-03 10:18:57 +02:00
Markus Lehtonen
58e1461d90
nfd-worker: add -feature-sources command line flag
...
Allows controlling (enable/disable) the "raw" feature detection.
Especially useful for development and testing.
2021-12-03 09:42:35 +02:00
Markus Lehtonen
df6909ed5e
nfd-worker: add core.featureSources config option
...
Add a configuration option for controlling the enabled "raw" feature
sources. This is useful e.g. in testing and development, plus it also
allows fully shutting down discovery of features that are not needed in
a deployment. Supplements core.labelSources which controls the
enablement of label sources.
2021-12-03 09:42:35 +02:00
Markus Lehtonen
2c3a4d1588
nfd-worker: rename nfdWorker.enabledSources to labelSources
...
Refactoring in head of adding new config option for feature sources.
2021-12-02 21:08:46 +02:00
Kubernetes Prow Robot
14ab512588
Merge pull request #670 from marquiz/devel/sources-disable
...
nfd-worker: disable sources more easily
2021-12-02 09:07:34 -08:00
Kubernetes Prow Robot
fe377458a9
Merge pull request #689 from marquiz/devel/ci-helm
...
scripts/test-infra: bump helm to v3.7.1
2021-12-02 07:39:33 -08:00
Kubernetes Prow Robot
21d3137753
Merge pull request #688 from marquiz/devel/e2e-image-poll-time
...
scripts: increase e2e-test image poll timeout to 12mins
2021-12-02 05:33:33 -08:00
Markus Lehtonen
80da116cab
scripts/test-infra: bump helm to v3.7.1
2021-12-02 12:34:41 +02:00
Markus Lehtonen
a543122d00
scripts: increase e2e-test image poll timeout to 12mins
...
Rare timeouts (narrowly missing) with 10 minutes observed, try
increasing by 2 minutes.
Also fix printing of error message in case of a timeout.
2021-12-02 10:56:36 +02:00
Markus Lehtonen
8cd58af613
nfd-worker: disable sources more easily
...
Make it easier to disable single sources by prefixing the source name
with a dash ('-') in the core.sources config option (or -sources cmdline
flag).
2021-12-02 10:36:51 +02:00
Markus Lehtonen
f00be091e3
docs: amend the documentation of core.labelSources option
2021-12-02 10:36:51 +02:00
Kubernetes Prow Robot
32e4271966
Merge pull request #684 from marquiz/devel/kconfig-values
...
source/kernel: unmangled kconfig values for custom rules
2021-12-02 00:21:33 -08:00
Markus Lehtonen
6f881a4822
source/kernel: unmangled kconfig values for custom rules
...
Stop converting "=y" and "=m" to "true" for the raw feature values used
in "kernel.config" custom rule processing.
In practice, this means that to check if a kernel config flag has been
set to "y" or "m", one needs to explicitly check for both of the values:
matchFeatures:
- feature: kernel.config
matchExpressions:
FOO: {op: In, value: ["y", "m"]}
instead of (how it used to be):
matchFeatures:
- feature: kernel.config
matchExpressions:
FOO: {op: IsTrue}
The legacy kconfig custom rule is unchanged as are the
kernel-config.<flag> feature labels.
2021-12-02 10:06:21 +02:00
Kubernetes Prow Robot
5de3cefa56
Merge pull request #682 from marquiz/fixes/kconfig-length
...
source/kernel: drop length check of kconfig values
2021-12-01 10:03:16 -08:00
Kubernetes Prow Robot
a2a68c1917
Merge pull request #673 from marquiz/devel/sources-flag
...
nfd-worker: rename 'sources' config option
2021-12-01 07:33:15 -08:00
Markus Lehtonen
0df88ac6f6
source/kernel: drop length check of kconfig values
...
Do not do length checking here. We do not need/want to limit the values
here because they could still be used in custom rules. Moreover, we do
more proper validation of label all label values in nfd-worker, anyway.
2021-12-01 17:21:53 +02:00
Markus Lehtonen
a22bab2d3d
docs: update docs on label-sources option
...
Update documentation on core.labelSources/core.sources config file
options and -label-sources/-sources command line flags.
2021-12-01 17:11:49 +02:00
Markus Lehtonen
77a6b27583
nfd-worker: introduce -label-sources cmdline flag
...
Useful for development, testing and debugging.
2021-12-01 17:11:49 +02:00
Markus Lehtonen
773280de65
nfd-worker: provide deprecated core.sources config option
...
Provide backwards compatibility via a deprecated 'core.sources' config
file option. This will override 'core.labelSources'. A warning is
printed in the log if this option is detected.
2021-12-01 17:11:49 +02:00
Markus Lehtonen
ad9c7dfa1e
nfd-worker: rename config option 'sources' to 'labelSources'
...
The goal is to make the name more descriptive. Also keeping in mind a
possible future addition a 'featureSources' option (or similar) for
controlling the feature discovery.
2021-12-01 17:11:49 +02:00
Kubernetes Prow Robot
5ae7b8bb7a
Merge pull request #683 from marquiz/devel/kconfig-regexp
...
source/kernel: ditch regexp in kconfig parsing
2021-12-01 06:53:15 -08:00
Kubernetes Prow Robot
86bfe74cd7
Merge pull request #671 from marquiz/fixes/single-dash-flags
...
Use single-dash format of cmdline flags
2021-12-01 06:45:15 -08:00
Kubernetes Prow Robot
4bb2311b5e
Merge pull request #667 from ArangoGutierrez/devel/clean-lables
...
Add deploy-prune makefile rule to ease devel processes
2021-12-01 06:09:16 -08:00
Kubernetes Prow Robot
4e6e730d28
Merge pull request #687 from marquiz/fixes/lint
...
Lint fixes to pkg/apis
2021-12-01 05:49:16 -08:00
Kubernetes Prow Robot
14e07401d8
Merge pull request #672 from marquiz/documentation/cmdline-help
...
docs: drop cmdline help from developer guide
2021-12-01 05:03:15 -08:00
Kubernetes Prow Robot
fb5e1b6424
Merge pull request #679 from ArangoGutierrez/devel/deploy_make
...
Makefile: Add make deploy rule
2021-12-01 04:49:15 -08:00
Markus Lehtonen
1765a37c6a
pkg/apis/nfd: drop unnecessary else statements
2021-12-01 10:55:50 +02:00
Markus Lehtonen
3f225be081
pkg/apis/nfd: use consistent receiver name for methods of templateHelper
2021-12-01 10:51:47 +02:00
Markus Lehtonen
d07400206f
pkg/apis/nfd/v1alpha1: document exported symbols
...
Add missing comments and fix some existing ones.
2021-12-01 10:46:56 +02:00
Markus Lehtonen
c4f7ab0abe
pkg/api/feature: document exported functions
2021-12-01 10:30:17 +02:00
Kubernetes Prow Robot
6f69b67708
Merge pull request #686 from spiffxp/fix-gcb-image
...
images: fix invalid k8s-staging-test-infra/gcb-docker-gcloud tag
2021-11-30 23:57:17 -08:00
Aaron Crickenberger
ae223e4de8
images: fix invalid k8s-staging-test-infra/gcb-docker-gcloud tag
2021-11-30 13:37:12 -08:00
Kubernetes Prow Robot
36d55629ef
Merge pull request #685 from spiffxp/use-k8s-infra-for-gcb-image
...
images: use k8s-staging-test-infra/gcb-docker-gcloud
2021-11-30 11:27:03 -08:00
Aaron Crickenberger
01c86b0521
images: use k8s-staging-test-infra/gcb-docker-gcloud
2021-11-30 11:16:01 -08:00
Kubernetes Prow Robot
a86318fb92
Merge pull request #675 from jschintag/s390x-new-cpu-flags
...
source/cpu: add additional IBM Z CPU Flags
2021-11-30 04:52:56 -08:00
Markus Lehtonen
d4efc2ce0b
source/kernel: ditch regexp in kconfig parsing
...
Regexp is just a resource hog here and does not simplify the code.
2021-11-30 14:43:05 +02:00
Carlos Eduardo Arango Gutierrez
f718379ba0
makefile: Add make deploy rule
...
After https://github.com/kubernetes-sigs/node-feature-discovery/pull/667
adding a rule for also deploying NFD is encouraged.
Signed-off-by: Carlos Eduardo Arango Gutierrez <carangog@redhat.com>
2021-11-29 15:11:08 -05:00
Carlos Eduardo Arango Gutierrez
4791bd3a42
Add clean-labels makefile rule to ease devel processes
...
Signed-off-by: Carlos Eduardo Arango Gutierrez <carangog@redhat.com>
2021-11-29 15:01:41 -05:00
Kubernetes Prow Robot
ffe12cb1e4
Merge pull request #663 from marquiz/devel/rule-backrefs
...
Add variables to feature rule spec and support backrefs
2021-11-29 09:29:23 -08:00
Markus Lehtonen
a57a25f63c
Use single-dash format of cmdline flags
...
Use the single-dash (i.e. '-option' instead of '--option') format
consistently accross log messages and documentation. This is the format
that was mostly used, already, and shown by command line help of the
binaries, for example.
2021-11-25 18:03:54 +02:00
Jan Schintag
c545cfb0dc
source/cpu: add additional IBM Z CPU Flags
...
Add the newly supported s390x CPU Flags for the 5.15 Kernel
Signed-off-by: Jan Schintag <jan.schintag@de.ibm.com>
2021-11-25 13:41:57 +01:00
Jan Schintag
476756ab0c
source/cpu: Fix compile error for non-amd64 arches
...
Signed-off-by: Jan Schintag <jan.schintag@de.ibm.com>
2021-11-25 13:41:57 +01:00
Markus Lehtonen
0d21b3d720
docs: drop cmdline help from developer guide
...
These just keep getting out of sync and do not provide much value. Also,
we do have dedicated cmdline reference for all the executables.
2021-11-25 13:56:09 +02:00
Markus Lehtonen
b648d005e1
pkg/apis/nfd: support templating of "vars"
...
Support templating of var names in a similar manner as labels. Add
support for a new 'varsTemplate' field to the feature rule spec which is
treated similarly to the 'labelsTemplate' field. The value of the field
is processed through the golang "text/template" template engine and the
expanded value must contain variables in <key>=<value> format, separated
by newlines i.e.:
- name: <rule-name>
varsTemplate: |
<label-1>=<value-1>
<label-2>=<value-2>
...
Similar rules as for 'labelsTemplate' apply, i.e.
1. In case of matchAny is specified, the template is executed separately
against each individual matchFeatures matcher.
2. 'vars' field has priority over 'varsTemplate'
2021-11-25 12:50:47 +02:00