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

200 commits

Author SHA1 Message Date
Muyassarov, Feruzjon
d9dc4b09d5 Bump cpuid to v2.2.3
Bump cpuid to v2.2.3 which adds support for detecting Intel Sierra
Forest instructions like AVXIFMA, AVXNECONVERT, AVXVNNIINT8 and
CMPCCXADD.
Signed-off-by: Muyassarov, Feruzjon <feruzjon.muyassarov@intel.com>
2022-12-30 11:42:05 +02:00
Markus Lehtonen
3209c14bea docs: document NodeFeature API
Document the usage of the NodeFeature CRD API. Also re-organize the
documentation a bit, moving the description of NodeFeatureRule
controller from customization guide to nfd-master usage page.
2022-12-14 22:33:12 +02:00
Markus Lehtonen
9f0806593d nfd-master: rename -featurerules-controller flag to -crd-controller
Deprecate the '-featurerules-controller' command line flag as the name
does not describe the functionality anymore: in practice it controls the
CRD controller handling both NodeFeature and NodeFeatureRule objects.
The patch introduces a duplicate, more generally named, flag
'-crd-controller'. A warning is printed in the log if
'-featurerules-controller' flag is encountered.
2022-12-14 10:23:45 +02:00
Markus Lehtonen
5a717c418b docs: small reordering of master cmdline reference
Move documentation of -enable-taints near '-enable-nodefeature-api' and
'-no-publish' as they are related in that they control the enablement of
APIs.
2022-12-14 07:31:28 +02:00
Markus Lehtonen
6ddd87e465 nfd-master: support NodeFeature objects
Add initial support for handling NodeFeature objects. With this patch
nfd-master watches NodeFeature objects in all namespaces and reacts to
changes in any of these. The node which a certain NodeFeature object
affects is determined by the "nfd.node.kubernetes.io/node-name"
annotation of the object. When a NodeFeature object targeting certain
node is changed, nfd-master needs to process all other objects targeting
the same node, too, because there may be dependencies between them.

Add a new command line flag for selecting between gRPC and NodeFeature
CRD API as the source of feature requests. Enabling NodeFeature API
disables the gRPC interface.

 -enable-nodefeature-api   enable NodeFeature CRD API for incoming
                           feature requests, will disable the gRPC
                           interface (defaults to false)

It is not possible to serve gRPC and watch NodeFeature objects at the
same time. This is deliberate to avoid labeling races e.g. by nfd-worker
sending gRPC requests but NodeFeature objects in the cluster
"overriding" those changes (labels from the gRPC requests will get
overridden when NodeFeature objects are processed).
2022-12-14 07:31:28 +02:00
Markus Lehtonen
237494463b nfd-worker: support creating NodeFeatures object
Support the new NodeFeatures object of the NFD CRD api. Add two new
command line options to nfd-worker:

 -kubeconfig               specifies the kubeconfig to use for
                           connecting k8s api (defaults to empty which
                           implies in-cluster config)
 -enable-nodefeature-api   enable the NodeFeature CRD API for
                           communicating node features to nfd-master,
                           will also automatically disable gRPC
                           (defgault to false)

No config file option for selecting the API is available as there should
be no need for dynamically selecting between gRPC and CRD. The
nfd-master configuration must be changed in tandem and it is safer (and
avoid awkward configuration races) to configure the whole NFD deployment
at once.

Default behavior of nfd-worker is not changed i.e. NodeFeatures object
creation is not enabled by default (but must be enabled with the command
line flag).

The patch also updates the kustomize and Helm deployment, adding RBAC
rules for nfd-worker and updating the example worker configuration.
2022-12-14 07:31:28 +02:00
Kubernetes Prow Robot
776a8c335c
Merge pull request #980 from marquiz/devel/topology-updater
nfd-topology-updater: update NodeResourceTopology objects directly
2022-12-08 01:44:22 -08:00
Markus Lehtonen
f13ed2d91c nfd-topology-updater: update NodeResourceTopology objects directly
Drop the gRPC communication to nfd-master and connect to the Kubernetes
API server directly when updating NodeResourceTopology objects.
Topology-updater already has connection to the API server for listing
Pods so this is not that dramatic change. It also simplifies the code
a lot as there is no need for the NFD gRPC client and no need for
managing TLS certs/keys.

This change aligns nfd-topology-updater with the future direction of
nfd-worker where the gRPC API is being dropped and replaced by a
CRD-based API.

This patch also update deployment files and documentation to reflect
this change.
2022-12-08 11:03:22 +02:00
Markus Lehtonen
881ee13654 docs: remove non-existent nodeFeatureRule.createCRD parameter
This value was recently dropped.
2022-12-07 16:25:43 +02:00
Markus Lehtonen
0834ec5cbf go.mod: update to klauspost/cpuid to v2.2.2
Support detection of Intel TME (Total Memory Encryption) plus AMXFP16
and PREFETCHI.
2022-12-07 13:58:19 +02:00
Feruzjon Muyassarov
984a3de198 Document tainting feature
Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
2022-12-02 17:29:10 +02:00
Kubernetes Prow Robot
f740f084e0
Merge pull request #976 from marquiz/docs/customization-guide
docs: small update to customization guide
2022-12-01 12:51:55 -08:00
Markus Lehtonen
72e523f277 scripts/mdlint: update mdlint to v0.12.0 2022-12-01 20:57:21 +02:00
Markus Lehtonen
32b252147c docs: small update to customization guide
Add a reference to the label rule format in the NodeFeatureRule section.
Also make it explicit in the beginning of Hooks section that hooks are
deprecated.
2022-12-01 18:33:48 +02:00
Markus Lehtonen
8a45384037 docs: simplify quick-start page
Move topology-updater deployment notes to the topology-updater usage
page. Also, rework the plaintext and headings a bit.
2022-12-01 12:22:23 +02:00
Markus Lehtonen
cdc7558f6f docs: better document custom resources
Add a separate page for describing the custom resources used by NFD.
Simplify the Introduction page by moving the details of
NodeResourceTopology from there. Similarly, drop long
NodeResourceTopology example from the quick-start page, making the page
shorter and simpler.
2022-12-01 11:12:59 +02:00
Kubernetes Prow Robot
efc833d1c7
Merge pull request #970 from marquiz/docs/worker-helm-sa-params
docs: document helm chart params related to worker serviceaccount
2022-11-28 08:36:08 -08:00
Markus Lehtonen
d0a4cf7564 docs: document helm chart params related to worker serviceaccount 2022-11-28 18:07:17 +02:00
Markus Lehtonen
c1fa8b2f28 docs: revise topology-updater helm chart rbac parameters 2022-11-28 17:49:19 +02:00
Markus Lehtonen
eb8e29c80a nfd-worker: drop deprecated command line flags
Drop the following flags that were deprecated already in v0.8.0:

-sleep-interval  (replaced by core.sleepInterval config file option)
-label-whitelist (replaced by core.labelWhiteList config file option)
-sources         (replaced by -label-sources flag)
2022-11-23 22:33:51 +02:00
Talor Itzhak
d495376f06 docs: topology-updater: update docs for exclude-list feature
Update the docs with explanations and examples
about the exclude-list feature.

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2022-11-21 21:31:51 +02:00
Markus Lehtonen
6f49421c0e docs: update github-pages gem to v227 2022-11-16 21:08:13 +02:00
Garrybest
3ec1b94020 get kubelet config from configz
Signed-off-by: Garrybest <garrybest@foxmail.com>
2022-11-08 23:52:35 +08:00
Markus Lehtonen
6171c745a4 docs: restructure docs
Introduce two main sections "Deployment" and "Usage" and move "Developer
guide" to the top level, too. In particular, split the huge
deployment-and-usage file into multiple parts under the new main
sections. Move customization guide from "Advanced" to "Usage".
This patch also renames "Advanced" to "Reference" as only that is left
there is reference documentation.
2022-11-03 10:26:56 +02:00
Markus Lehtonen
3a279ce751 docs: update the name of the base image 2022-11-02 15:10:46 +02:00
Kubernetes Prow Robot
e5c8180558
Merge pull request #937 from pacoxu/master
Stop using the beta.kubernetes.io/os and arch labels
2022-10-27 05:36:32 -07:00
Paco Xu
4e12ed8aac Stop using the beta.kubernetes.io/os and arch labels 2022-10-27 11:03:14 +08:00
Fabiano Fidêncio
d5db1cf907 cpu: Discover Intel TDX
Set `cpu-security.tdx.enable` to `true` when TDX is avialable and has
been enabled. otherwise it'll be set to `false`.

`/sys/module/kvm_intel/parameters/tdx` presence and content is used to
detect whether a CPU is Intel TDX capable.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-10-03 09:56:24 +02:00
Kubernetes Prow Robot
8662d17530
Merge pull request #871 from fmuyassarov/disable-hook
Config option to disable hooks
2022-09-26 10:40:08 -07:00
Markus Lehtonen
db7dd93a64 docs: fix incorrect shell snippet for removing labels 2022-09-15 16:18:09 +03:00
Markus Lehtonen
f21315d85f Update kubernetes registry to registry.k8s.io
Update registry location for non-nfd images.
2022-09-12 11:23:04 +03:00
Markus Lehtonen
4f34451db8 Update NFD registry to registry.k8s.io
Kubernetes has moved to a new container image registry:
https://groups.google.com/a/kubernetes.io/g/dev/c/DYZYNQ_A6_c/m/FpHqeVR2BAAJ
2022-09-12 11:21:12 +03:00
Kubernetes Prow Robot
77af16fe9d
Merge pull request #880 from fmuyassarov/add-tiltfile/feruz
Add Tilt option for developing NFD
2022-09-06 12:06:23 -07:00
Kubernetes Prow Robot
81da164b7f
Merge pull request #833 from marquiz/devel/security-refactor
cpu: re-organize security features
2022-09-01 05:29:06 -07:00
Feruzjon Muyassarov
e7af8d068f Update documentation about hooks depreciation
Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
2022-09-01 10:58:35 +03:00
Feruzjon Muyassarov
a675fd93fd Don't advertise BASE_IMAGE_FULL and BASE_IMAGE_MINIMAL
Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
2022-08-30 17:37:01 +03:00
Feruzjon Muyassarov
a30ceb2973 Describe how to develop locally with Tilt
Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
2022-08-30 17:36:58 +03:00
Viktor Oreshkin
7498e49ba5 helm: add priorityClassName to worker
Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
2022-08-22 06:45:52 +03:00
Francesco Romani
622adf3863 test: e2e: configurable pull policy
In some cases (CI) it is useful to run NFD e2e tests using
ephemeral clusters. To save time and bandwidth, it is also useful
to prime the ephemeral cluster with the images under test.

In these circumstances there is no risk of running a stale image,
and having a `Always` PullPolicy hardcoded actually makes
the whole exercise null.

So we add a new option, disabled by default, to make the e2e
manifest use the `IfNotPresent` pull policy, to effectively
cover this use case.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2022-08-10 15:06:59 +02:00
Mikko Ylinen
026fcb2199 go.mod: update github.com/klauspost/cpuid to v2.1.0
The release relaxes detection of features that have non-AVX512
versions etc..

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-08-09 11:25:39 +03:00
Markus Lehtonen
f62b057bcd cpu: re-organize security features
Move existing security/trusted-execution related features (i.e. SGX and
SE) under the same "security" feature, deprecating the old features. The
motivation for the change is to keep the source code and user interface
more organized as we experience a constant inflow of similar security
related features. This change will affect the user interface so it is
less painful to do it early on.

New feature labels will be:

  feature.node.kubernetes.io/cpu-security.se.enabled
  feature.node.kubernetes.io/cpu-security.sgx.enabled

and correspondingly new "cpu.security" feature with "se.enabled" and
"sgx.enabled" elements will be available for custom rules, for example:

      - name: "sample sgx rule"
        labels:
          sgx.sample.feature: "true"
        matchFeatures:
          - feature: cpu.security
            matchExpressions:
              "sgx.enabled": {op: IsTrue}

At the same time deprecate old labels "cpu-sgx.enabled" and
"cpu-se.enabled" feature labels and the corresponding features for
custom rules. These will be removed in the future causing an effective
change in NFDs user interface.
2022-06-28 13:38:31 +03:00
Markus Lehtonen
136c036d4d Drop the iommu source
It was deprecated in v0.10.0.
2022-06-14 15:00:29 +03:00
Markus Lehtonen
b480f5b0ba docs: small typo fix in cpuid feature list 2022-06-08 09:16:37 +03:00
Markus Lehtonen
cc1da2efe3 docs: update x86 cpuid feature list
Update the partial list of x86 cpuid features that are presented in the
NFD documentation. In particular, the following instructions were left
out of the list: AVXSLOW, CETIBT, CETSS, CLDEMOTE, HLE, MPX, RTM,
RTM_ALWAYS_ABORT, SERIALIZE, SHA, TSXLDTRK.
2022-06-07 11:56:12 +03:00
Markus Lehtonen
05af1841cd docs: fix operator deployment instructions
Namespace parameter was dropped in operator v0.4.0.
2022-05-02 13:27:18 +03:00
Markus Lehtonen
9424eb7042 docs: remove fixed release tag in developer guide
Let the documentation follow the latest release name. Even if it's just
referential here it would look odd in the future if we refer to some
ancient version.
2022-03-29 09:47:42 +03:00
Jakob Naucke
9e95dde38b
cpu: Discover IBM Secure Execution
Set `cpu.se-enabled` to `true` when IBM Secure Execution for Linux
(IBM Z & LinuxONE) is available and has been enabled.

Uses `/sys/firmware/uv/prot_virt_host`, which is available in kernels
>=5.12 + backports. For simplicity, skip more complicated facility &
kernel cmdline lookups.
2022-03-28 12:28:07 +02:00
Carlos Eduardo Arango Gutierrez
cb0a6fca53
Add cpu-model feature detection (#792)
* Add cpu-model feature detection

Signed-off-by: Carlos Eduardo Arango Gutierrez <carangog@redhat.com>

* Apply suggestions from code review

Co-authored-by: Markus Lehtonen <markus.lehtonen@intel.com>

Co-authored-by: Markus Lehtonen <markus.lehtonen@intel.com>
2022-03-28 02:51:23 -07:00
Kubernetes Prow Robot
f952b9feed
Merge pull request #794 from dailymotion-oss/feat/add-annotations-dp-ds
helm: add annotations to daemonset and deployment
2022-03-25 07:37:59 -07:00
Cyril Corbon
eeb1f0d5e5
helm: add annotations to daemonset and deployment
Signed-off-by: Cyril Corbon <cyril.corbon@dailymotion.com>
2022-03-24 12:13:29 +01:00