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

560 commits

Author SHA1 Message Date
Kubernetes Prow Robot
691f13d2c6
Merge pull request #313 from marquiz/devel/build
Slight rework of building
2020-08-23 10:55:40 -07:00
Kubernetes Prow Robot
54ba34b7ff
Merge pull request #337 from marquiz/devel/gcb
cloudbuild.yaml: use correct tags
2020-08-23 10:45:40 -07:00
Markus Lehtonen
ff088d6033 cloudbuild.yaml: use correct tags 2020-08-21 14:48:46 +03:00
Markus Lehtonen
906b1a075f README: document new hostmount prefix Makefile variables 2020-08-21 14:32:50 +03:00
Markus Lehtonen
1f873f0dfc Dockerfile: rename version ARG
Use the same naming across Makefile and Dockerfile.
2020-08-21 14:27:39 +03:00
Markus Lehtonen
342c1dfbc6 Dockerfile: use make for building
Modify Makefile to have separate hostmount prefix settings for local and
container builds in order to preserve the current behavior.
2020-08-21 14:27:39 +03:00
Markus Lehtonen
2b5488299e Makefile: add install target 2020-08-21 14:27:39 +03:00
Markus Lehtonen
02dc1ae1e9 Makefile: add build target 2020-08-21 14:27:39 +03:00
Kubernetes Prow Robot
a68a4ec4fb
Merge pull request #325 from marquiz/devel/hardening
Container image hardening
2020-08-21 02:51:39 -07:00
Kubernetes Prow Robot
b6e310902a
Merge pull request #331 from marquiz/devel/image-repo-change
Change release image repo to k8s.gcr.io
2020-08-21 02:39:39 -07:00
Kubernetes Prow Robot
c24112ba61
Merge pull request #332 from marquiz/devel/gcb
Add cloudbuild.yaml
2020-08-21 02:03:39 -07:00
Kubernetes Prow Robot
26c3cf9e4e
Merge pull request #324 from marquiz/devel/e2e-test
Small improvements in e2e tests
2020-08-21 01:53:39 -07:00
Kubernetes Prow Robot
f1c8c3aa95
Merge pull request #335 from marquiz/devel/prow
scripts: add scripts for kubernetest test-infra jobs
2020-08-21 01:33:39 -07:00
Markus Lehtonen
33eabbdd22 scripts: add scripts for kubernetest test-infra jobs
A step towards moving away from TravisCI.
2020-08-11 15:55:31 +03:00
Markus Lehtonen
9e6bef4b71 Add cloudbuild.yaml
Basic google cloud build configuration.
2020-08-07 19:15:32 +03:00
Markus Lehtonen
8aa96ac976 Update RELEASE.md
Describe the current release process. Contains some transitory steps
involving quay.io that will be removed when the CI has been adapted to
work with the new image repo.
2020-08-07 10:59:06 +03:00
Markus Lehtonen
6ef6cdec65 README: change image registry to k8s.gcr.io 2020-08-07 10:33:14 +03:00
Markus Lehtonen
844c73799e Makefile: change image registry to k8s.gcr.io/nfd 2020-08-07 10:25:19 +03:00
Markus Lehtonen
bb99b2b627 Use k8s.gcr.io image registry in deployment spec templates
Shift from quay.io to the new community managed image registry.
2020-08-07 10:15:22 +03:00
Kubernetes Prow Robot
ee8a087f9f
Merge pull request #330 from kad/golang-update
Update builder image to Go 1.13.12
2020-08-05 03:58:28 -07:00
Alexander Kanevskiy
eb8fe6393a Update builder image to Go 1.13.12
Go versions after 1.13.7 contain fix for CVE-2020-7919
2020-07-10 14:24:01 +03:00
Kubernetes Prow Robot
c2503a20ab
Merge pull request #319 from marquiz/devel/v0.6.0
Use release v0.6.0 in deployment templates and README
2020-05-28 08:58:03 -07:00
Markus Lehtonen
3cd2d34ea7 Add container security context to the sample deployment specs
Run under strict rules. We shouldn't need any special privileges.
2020-05-28 15:49:00 +03:00
Markus Lehtonen
855bf34190 Dockerfile: run as non-root 2020-05-28 15:10:03 +03:00
Markus Lehtonen
5e62ced4d8 Use release v0.6.0 in deployment templates and README 2020-05-26 15:08:31 +03:00
Kubernetes Prow Robot
1b84e19024
Merge pull request #323 from marquiz/devel/docs
README: document E2E_TEST_CONFIG Makefile variable
2020-05-26 04:33:11 -07:00
Markus Lehtonen
331f56ecc3 test/e2e: drop hostNetwork from worker pod spec
We don't need or use that anymore.
2020-05-25 16:37:38 +03:00
Markus Lehtonen
ff2c30a63c test/e2e: slightly more informative test output 2020-05-25 16:37:27 +03:00
Markus Lehtonen
00ccbe95bb test/e2e: fail faster waiting on master pod
Reduce timeout from the default 5 minutes to one minute. Error out
faster e.g. if accidentally trying to test a non-existing image.
2020-05-25 13:16:56 +03:00
Markus Lehtonen
32290ea8f8 README: document E2E_TEST_CONFIG Makefile variable 2020-05-25 10:38:54 +03:00
Kubernetes Prow Robot
59a88b07e1
Merge pull request #322 from adaptant-labs/cpuid-arm
cpu: Add support for ARM/Aarch32 cpuid
2020-05-24 23:35:11 -07:00
Kubernetes Prow Robot
fd1275a7e1
Merge pull request #317 from marquiz/devel/network
source/network: run discovery under /host-sys
2020-05-21 10:52:15 -07:00
Paul Mundt
4d5b5974df cpu: Add support for ARM/Aarch32 cpuid
This provides support for 32-bit ARM cpuid capabilities based on
the HWCAP flags, and enables the build of NFD on the 32-bit ARM
userland - notably, this also applies to ARM64 systems that are
running userspace in Aarch32 mode, which is where this problem
was first encountered.

Signed-off-by: Paul Mundt <paul.mundt@adaptant.io>
2020-05-21 19:42:44 +02:00
Markus Lehtonen
d216fca1c0 source/network: run discovery under host sysfs
Instead of relying on golang "net" package, use the configured host
sysfs for all discovery. No need to use hostNetwork after that so drop
it from the worker deployment templates.
2020-05-21 20:33:30 +03:00
Kubernetes Prow Robot
e9017bef06
Merge pull request #304 from marquiz/devel/config-reload
Rework config handling
2020-05-21 03:10:36 -07:00
Markus Lehtonen
2620e650bf README: document nfd-worker run-time re-configurability 2020-05-21 00:59:39 +03:00
Markus Lehtonen
9e813a559c nfd-worker: reload config on each re-discovery pass
Dumb re-read/re-parse of the configuration file on every round of
discoery. Probably not the most elegant solution to watch for config
file changes, but, it works and doesn't cost much overhead.
2020-05-21 00:59:39 +03:00
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
c95ad3198c nfd-worker: refactor handling of enabled sources and labels
Make the list of enabled sources and the label whitelist regexp members
of the nfdWorker instance. Get rid of the not-that-well-defined
configureParameters() function.
2020-05-21 00:48:21 +03:00
Kubernetes Prow Robot
ad5eef1514
Merge pull request #307 from marquiz/devel/label-whitelist
nfd-worker: fix --label-whitelist
2020-05-20 13:54:20 -07:00
Markus Lehtonen
c24885840c Better document the --label-whitelist flag 2020-05-20 23:19:09 +03:00
Markus Lehtonen
818fc4cc70 nfd-worker: fix --label-whitelist
Unify handling of --label-whitelist in nfd-worker and nfd-master. That is,
in nfd-worker, apply the regexp filter on non-namespaced part of the
label name.

Brief history:
1. Originally the whitelist regexp was applied on the full namespaced
   label name (that would be e.g.
   'feature.node.kubernetes.io/cpu-cpuid.AVX' in the current nfd version)

2. Commit 81752b2d changed the behavior so that the regexp was applied
   on the non-namespaced part (that would be `cpu-cpuid.AVX`)

3. Commit 40918827 added support for custom label namespaces. With this
   change, the label whitelist handling diverged between nfd-worker and
   nfd-master. In nfd-master the whitelist regexp is always applied on
   the non-namespaced label name. However, in nfd-worker the whitelist
   handling is two-fold (and inconsistent): for labels in the standard
   nfd namespace regexp is applied on the non-namespaced part (e.g.
   `cpu-cpuid.AVX`, but, for labels in custom namespaces the regexp is
   applied on the full name (e.g. `example.com/my-feature`).

This patch changes nfd-worker to behave similarly to nfd-master. The
namespace part is now always omitted, which should be easier for the
users to comprehend.

Also, fixes a bug in the label name prefixing so that the name of the
feature source is not prefixed into labels with custom label namespace
(effectively mangling the intended namespace). For example, previously a
'example.com/feature' label from the 'custom' feature source would be
prefixed with the source name, mangling it to
'custom-example.com/feature'.
2020-05-20 23:07:13 +03:00
Kubernetes Prow Robot
e09db73614
Merge pull request #318 from marquiz/devel/sysfs
source: parametrise host directory paths
2020-05-20 13:04:20 -07:00
Markus Lehtonen
704c81a4d2 Make host mount prefix configurable in Makefile and Dockerfile
Introduce a new makefile variable and dockerfile build arg named
HOSTMOUNT_PREFIX for changing the prefix used for mounting host
directories inside the container. Adds a sed rule in Makefile to
generate deployment yamls accordingly.
2020-05-20 22:15:41 +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
248859c64d source: parametrise host directory paths
Specify and handle system paths we use for discovery in a unified way.
2020-05-20 22:15:41 +03:00
Kubernetes Prow Robot
f65def9460
Merge pull request #315 from marquiz/devel/lint
Verify golangci-lint
2020-05-20 12:08:19 -07:00
Kubernetes Prow Robot
a8fc2c3531
Merge pull request #320 from Ethyling/fix-gofmt-usb
source/custom: minor change in usb rule for gofmt
2020-05-20 12:02:19 -07:00
Markus Lehtonen
a7dc63e091 travis: add ci-lint check
Build fails if lint does not pass muster.
2020-05-20 21:48:06 +03:00
Markus Lehtonen
640dc9fbf3 source: miscellaneous lint fixes 2020-05-20 21:48:06 +03:00