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

1407 commits

Author SHA1 Message Date
Markus Lehtonen
59ebff46c9 apis/nfd: add CRD for communicating node features
Add a new NodeFeature CRD to the nfd Kubernetes API to communicate node
features over K8s api objects instead of gRPC. The new resource is
namespaced which will help the management of multiple NodeFeature
objects per node. This aims at enabling 3rd party detectors for custom
features.

In addition to communicating raw features the NodeFeature object also
has a field for directly requesting labels that should be applied on the
node object.

Rename the crd deployment file to nfd-api-crds.yaml so that it matches
the new content of the file. Also, rename the Helm subdir for CRDs to
match the expected chart directory structure.
2022-12-14 07:31:28 +02:00
Kubernetes Prow Robot
877c4ce560
Merge pull request #988 from marquiz/devel/nfd-master-errcheck
nfd-master: add error checking for CRD controller creation
2022-12-13 14:57:33 -08:00
Markus Lehtonen
079655b42c nfd-master: add error checking for CRD controller creation 2022-12-14 00:27:27 +02:00
Kubernetes Prow Robot
6975680195
Merge pull request #987 from fmuyassarov/bump-k8s
Bump go.mod k8s.io to 1.26
2022-12-13 02:31:34 -08:00
Feruzjon Muyassarov
b296bdf0b3 update test functions according to upstream deprecated/removed methods
Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
2022-12-13 12:12:50 +02:00
Feruzjon Muyassarov
409312e111 Bump go.mod k8s.io to 1.26
Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
2022-12-13 12:12:46 +02:00
Kubernetes Prow Robot
733fb5deaa
Merge pull request #984 from marquiz/devel/worker-namespace
nfd-worker: detect the namespace it is running in
2022-12-09 07:10:11 -08: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
87b92f88ca nfd-worker: detect the namespace it is running in
Implement detection of kubernetes namespace by reading file
/var/run/secrets/kubernetes.io/serviceaccount/namespace

Aa a fallback (if the file is not accessible) we take namespace from
KUBERNETES_NAMESPACE environment variable. This is useful for e.g.
testing and development where you might run nfd-worker directly from the
command line on a host system.
2022-12-08 10:34:52 +02:00
Kubernetes Prow Robot
fbb4273902
Merge pull request #983 from marquiz/fixes/docs-helm
docs: remove non-existent nodeFeatureRule.createCRD parameter
2022-12-07 07:02:39 -08:00
Markus Lehtonen
881ee13654 docs: remove non-existent nodeFeatureRule.createCRD parameter
This value was recently dropped.
2022-12-07 16:25:43 +02:00
Kubernetes Prow Robot
f0ca0ffb5d
Merge pull request #979 from marquiz/fixes/helm-topology-updater
helm: fix mount name of topology-updater config
2022-12-07 05:28:40 -08:00
Kubernetes Prow Robot
34fe654ba5
Merge pull request #982 from marquiz/devel/cpuid
go.mod: update to klauspost/cpuid to v2.2.2
2022-12-07 04:56:38 -08:00
Kubernetes Prow Robot
66a4ce9488
Merge pull request #981 from tariq1890/svc-selector
nfd-master svc should select only nfd-master pods
2022-12-07 04:10:37 -08: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
Kubernetes Prow Robot
9f68f6c93a
Merge pull request #910 from fmuyassarov/taint/feruz
Allow optionally setting node taints defined on the NodeFeatureRule CR
2022-12-06 07:28:37 -08:00
Kubernetes Prow Robot
e8cb8785ae
Merge pull request #978 from marquiz/fixes/helm
helm: drop NodeFeatureRule CRD from templates
2022-12-06 05:06:37 -08:00
Tariq Ibrahim
153815fa56 nfd-master svc should select only nfd-master pods 2022-12-05 17:45:26 -08:00
Feruzjon Muyassarov
984a3de198 Document tainting feature
Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
2022-12-02 17:29:10 +02:00
Feruzjon Muyassarov
2bdf427b89 nfd-master logic update for setting node taints
This commits extends NFD master code to support adding node taints
from NodeFeatureRule CR. We also introduce a new annotation for
taints which helps to identify if the taint set on node is owned
by NFD or not. When user deletes the taint entry from
NodeFeatureRule CR, NFD will remove the taint from the node. But
to avoid accidental deletion of taints not owned by the NFD, it
needs to know the owner. Keeping track of NFD set taints in the
annotation can be used during the filtering of the owner. Also
enable-taints flag is added to allow users opt in/out for node
tainting feature. The flag takes precedence over taints defined
in NodeFeatureRule CR. In other words, if enbale-taints is set to
false(disabled) and user still defines taints on the CR, NFD will
ignore those taints and skip them from setting on the node.

Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
2022-12-02 17:25:00 +02:00
Feruzjon Muyassarov
532e1193ce Add taints field to NodeFeatureRule CR spec
Extend NodeFeatureRule Spec with taints field to allow users to
specify the list of the taints they want to be set on the node if
rule matches.

Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
2022-12-02 17:25:00 +02:00
Markus Lehtonen
7840fe52e5 helm: fix mount name of topology-updater config 2022-12-02 17:18:57 +02:00
Markus Lehtonen
c1bdcd9511 helm: drop NodeFeatureRule CRD from templates
Helm 3 can manage CRDs in a more user friendly way. In fact, this now
causes deployment failure as Helm automatically tries to install the CRD
from the "crds/" subdir, too.
2022-12-02 14:56:59 +02:00
Kubernetes Prow Robot
1accbbf337
Merge pull request #975 from marquiz/fixes/e2e
test/e2e: no pod restart policy of nfd-worker by default
2022-12-02 00:37:54 -08: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
Kubernetes Prow Robot
4dee120a81
Merge pull request #977 from marquiz/devel/mdlint
scripts/mdlint: update mdlint to v0.12.0
2022-12-01 12:45:54 -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
42ae216284 test/e2e: no pod restart policy of nfd-worker by default
Fixes stricter API check on daemonset pod spec that started to cause e2e
test failures. RestartPolicyNever that we previously set (by defaylt)
isn't compatible with DaemonSets.
2022-12-01 16:14:11 +02:00
Kubernetes Prow Robot
fbce8d7702
Merge pull request #973 from marquiz/docs/quickstart
docs: simplify quick-start page
2022-12-01 05:06:27 -08: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
Kubernetes Prow Robot
d5e7f9091f
Merge pull request #974 from marquiz/docs/crds
docs: better document custom resources
2022-12-01 01:18:27 -08: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
c22604ebb8
Merge pull request #967 from k8stopologyawareschedwg/move_pod_utils
e2e: move pod utils to a seperate package
2022-11-30 04:00:54 -08:00
Kubernetes Prow Robot
ff1565f637
Merge pull request #972 from marquiz/fixes/deployment
deployment: drop stale nfd-api-crds.yaml
2022-11-30 02:24:55 -08:00
Talor Itzhak
0a06562930 e2e: simplify sleeper pod
Make it more flexiable by allowing modifying both
CPU and memory values, using functional options

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2022-11-29 14:39:54 +02:00
Talor Itzhak
9c725c378f e2e: separate daemonset functions from pod
The new package should provide pod-related utilities,
hence let's move all the daemonset-related utilities
to their own package as well.

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2022-11-29 14:39:52 +02:00
Talor Itzhak
6364803b0c e2e: move pod utils to a seperate package
By moving those utils in to a seperate package,
we can make the functions names shorter and clearer.

For example, instead of:
```
testutils.NFDWorkerPod(opts...)
testutils.NFDMasterPod(opts...)
testutils.SpecWithContainerImage(...)
```
we'll have:
```
testpod.NFDWorker(opts...)
testpod.NFDMaster(opts...)
testpod.SpecWithContainerImage(...)
```

It will also make the package more isolated and portable.

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2022-11-29 13:47:00 +02:00
Markus Lehtonen
37d51c96f1 deployment: drop stale nfd-api-crds.yaml
Remove a stale unused file that was accidentally committed from an
experimental work.
2022-11-29 13:46:30 +02:00
Kubernetes Prow Robot
87573b08ba
Merge pull request #971 from marquiz/fixes/e2e
test/e2e: remove dropped -sleep-interval arg
2022-11-29 01:01:22 -08:00
Markus Lehtonen
6f02ef92de test/e2e: remove dropped -sleep-interval arg
Replace with a ConfigMap-based configuration.
2022-11-29 10:22:48 +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
Kubernetes Prow Robot
a4627758d9
Merge pull request #969 from marquiz/docs/helm-params-fix
docs: revise topology-updater helm chart rbac parameters
2022-11-28 08:26:07 -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
Kubernetes Prow Robot
3139897588
Merge pull request #968 from marquiz/devel/worker-flags
nfd-worker: drop deprecated command line flags
2022-11-28 00:26:07 -08:00
Kubernetes Prow Robot
ef2c498a6f
Merge pull request #966 from k8stopologyawareschedwg/sc_for_master
e2e: add SecurityContext to master
2022-11-24 22:18:04 -08:00
Kubernetes Prow Robot
7bab38a51e
Merge pull request #965 from marquiz/devel/e2e-confifmap
test/e2e: add helper for creating new configmaps
2022-11-24 15:46:04 -08:00
Talor Itzhak
f31b70dce4 e2e: add SecurityContext to master
The master pod need these `SecurityContext` configurations
In order to run inside a namespace with restricted policy

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2022-11-24 14:48:01 +02:00