1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-15 21:08:23 +00:00
Commit graph

406 commits

Author SHA1 Message Date
Markus Lehtonen
c3844a63c5 docs: update the navbar versions menu
Make it hidden, by default. Unify style with other items in the navbar
(making version list horizontal, for example). Show current version next
to the caret mark that opens the menu.

(cherry picked from commit e036d26953)
2020-10-30 08:56:40 +02:00
Markus Lehtonen
f570c5f96c docs: sync navbar from jekyll-rdt-theme v2.0.9
(cherry picked from commit 82f5c89e1a)
2020-10-30 08:56:31 +02:00
Markus Lehtonen
9fe3a14f04 docs: make the list of available versions dynamic
Make the list of available versions dynamic. The items displayed is now
generated with javascript. The parent directory of the site is supposed
to contain versions.js providing getVersionListItems() that returns the
available versions.

The update-gh-pages.sh script is modified to update/create versions.js
on every invocation. It simply lists all directories in the root
directory and adds them to the version list.

(cherry picked from commit c05c6f2e5b)
2020-10-30 08:54:38 +02:00
Markus Lehtonen
eb721cdff9 update-gh-pages.sh: create 'stable' symlink
Create/update a symlink to the documentation of the latest released
version (if one exists).

(cherry picked from commit 502a8c83a9)
2020-10-30 08:52:10 +02:00
Kubernetes Prow Robot
5f4427e95d
Merge pull request #372 from marquiz/devel/release-0.6
release-0.6: sync CI and docs/ from master
2020-10-29 14:18:06 -07:00
Markus Lehtonen
96e9dbd2c1 Enable automated update of gh-pagaes
Add 'scripts/github/update-gh-pages.sh' for updating gh-pages branch.
This new script intended for github actions integration and builds the
html documentation from the currently checked-out commit and updates the
corresponding version subfolder in the gh-pages branch. The version is
taken from GITHUB_REF environment variable and defaults to 'master' if
the env var is empty. For testing purposes or manual updates the
subfolder can also be given directly as a command line argument.

Add 'scripts/test-infra/build-gh-pages.sh' for verifying that site
(gh-pages) builds successfully. This is intended for integration with
kubernetes test-infra.

Finally, add Github workflow for updating gh-pages. This job is run on
master and release branches plus all tags starting with letter 'v'.

(cherry picked from commit c5beeffb6a)
2020-10-22 21:52:12 +03:00
Markus Lehtonen
6249bfc5cb scripts: copy prow integration from master
Copy all test-infra scripts and cloudbuild.yaml from master.

Also cherry-pick the required poll-image Makefile target.

(copied from commit a08fb66fa7)
2020-10-22 21:51:56 +03:00
Markus Lehtonen
d2bfee21cd Makefile: add rules for building html docs
Add rules for building and serving the html documentation inside a
container.
- 'make site-build' will build the html content unders docs/_site.
- 'make site-serve' builds the site content and serves it at
  http://localhost:4000/

(cherry picked from commit 5ec91935df)
2020-10-22 21:51:12 +03:00
Markus Lehtonen
46f669fb1a docs: update site setup to release-0.6 branch 2020-10-22 21:51:12 +03:00
Markus Lehtonen
578c8f2b9f docs: copy site setup from master
Copy the virtually empty Jekyll site as a base.

(copied from commit a08fb66fa7)
2020-10-22 21:50:32 +03:00
Markus Lehtonen
f4e7e7309e Fix up Makefile variable initialization and documentation
An attempt to organize the Makefile variables a bit further. The idea is
to only document variables that are really intended for build
customization and initialize all these variables in the Makefile with
'=?' so that they can be specified in the environment (and not just with
variable overrides). Thus, this patch drops some variables from the
README and change the initialization of some variables in the Makefile
so that the two files would be in sync.

(cherry picked from commit 890380892d)
2020-10-21 15:37:37 +03:00
Carlos Eduardo Arango Gutierrez
c193da1d45 Fix Makefile to take vaules from ENV VAR values
make image and make push fails when trying to use an ENV VAR value, as
it is now they can only be overrided.

the Var modified are
GO_CMD
GO_FMT
IMAGE_BUILD_EXTRA_OPTS
IMAGE_BUILD_CMD
IMAGE_PUSH_CMD
IMAGE_TAG_NAME
IMAGE_REGISTRY
IMAGE_NAME
IMAGE_EXTRA_TAG_NAMES
K8S_NAMESPACE
HOSTMOUNT_PREFIX

This new behaviour has also been updated on the README.

Signed-off-by: Carlos Eduardo Arango Gutierrez <carangog@redhat.com>
(cherry picked from commit 4bcb0cf851)
2020-10-21 15:37:29 +03:00
Markus Lehtonen
910ec7c19c Makefile: add IMAGE_EXTRA_TAG_NAMES variable
Make it possible to create and push multiple container image tags with
single invocation of make.

(cherry picked from commit 4e5df73747)
2020-10-21 15:36:13 +03:00
Markus Lehtonen
a785f2825d README: document new hostmount prefix Makefile variables
(cherry picked from commit 906b1a075f)
2020-10-21 15:27:56 +03:00
Markus Lehtonen
d75beace9b Dockerfile: rename version ARG
Use the same naming across Makefile and Dockerfile.

(cherry picked from commit 1f873f0dfc)
2020-10-21 15:25:47 +03:00
Markus Lehtonen
326ff24b2a 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.

(cherry picked from commit 342c1dfbc6)
2020-10-21 15:25:47 +03:00
Markus Lehtonen
90802ca450 Makefile: add install target
(cherry picked from commit 2b5488299e)
2020-10-21 15:25:47 +03:00
Markus Lehtonen
3f27699d9e Makefile: add build target
(cherry picked from commit 02dc1ae1e9)
2020-10-21 15:25:47 +03:00
Markus Lehtonen
c409d653bf README: change image registry to k8s.gcr.io
(cherry picked from commit 6ef6cdec65)
2020-10-21 15:24:57 +03:00
Markus Lehtonen
73dcd08529 Makefile: change image registry to k8s.gcr.io/nfd
(cherry picked from commit 844c73799e)
2020-10-21 15:24:57 +03:00
Markus Lehtonen
038c84ee1d Use k8s.gcr.io image registry in deployment spec templates
Shift from quay.io to the new community managed image registry.

(cherry picked from commit bb99b2b627)
2020-10-21 15:24:57 +03:00
Markus Lehtonen
9c8a428839 Drop TravisCI integration
All CI has been migrated over to Kubernetes test-infra.

(cherry picked from commit 006234b69d)
2020-10-21 14:56:12 +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
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
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
Markus Lehtonen
057f31d7e3 fsource/local: lint fixes 2020-05-20 21:48:06 +03:00
Markus Lehtonen
a65d05bd9c source/panic_fake: rename module to make lint happy 2020-05-20 21:48:06 +03:00
Markus Lehtonen
853609f721 nfd-master: lint fixes 2020-05-20 21:48:06 +03:00
Markus Lehtonen
80becea590 source/custom: make linter happy
Might not agree with all that naming arbitrariness but it's easier just
to bend over.
2020-05-20 21:48:06 +03:00