1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-04-08 01:54:00 +00:00
Commit graph

544 commits

Author SHA1 Message Date
Kubernetes Prow Robot
d9db00d345
Merge pull request from mfranczy/version-range
Allow to define types for NFR/NFG expressions
2025-04-07 00:20:39 -07:00
Marcin Franczyk
4cf8032ac5 NFD API: Add the 'type' field for MatchExpression 2025-04-03 20:16:03 +02:00
Markus Lehtonen
225070eeab nfd-master: drop the deprecated autoDefaultNs config option
The autoDefaultNs was deprecated in NFD v0.16 and replaced by the
DisableAutoPrefix feature gate.
2025-04-03 10:31:12 +03:00
Kubernetes Prow Robot
7db71fc4e2
Merge pull request from marquiz/devel/nfg-feature-gate
nfd-master: make the NodeFeatureGroupAPI feature gate effective
2025-03-27 09:14:46 -07:00
Markus Lehtonen
acc94b9f73 nfd-master: make the NodeFeatureGroupAPI feature gate effective 2025-03-20 18:31:09 +02:00
Markus Lehtonen
8affb9dc11 Revert "nfd-master: use only unbuffered chans in the nfd api-controller"
Fixes a bug where updates to NodeFeatureGroup objects were not happening
after the initial sync.

We need to use buffered channels for the "update all" channels as there
is the default: case in select that is sending the update all signal (to
the channel). An alternative would be to remove the default: case from
the select block but it is more efficient this way - just skip if the
reader side hasn't yet got the "update all" signal.

This reverts commit bf6ffadf36.
2025-03-20 18:21:54 +02:00
Kubernetes Prow Robot
0914fa442f
Merge pull request from fmuyassarov/modernize
Apply modernize analysis improvements
2025-03-17 02:29:48 -07:00
Kubernetes Prow Robot
6f6f5d68e1
Merge pull request from marquiz/devel/compat-api-types
compat/api: use GroupRule type
2025-03-14 12:35:51 -07:00
Kubernetes Prow Robot
a2600b9f0f
Merge pull request from mfranczy/extend-comparison-operators
Add new comparison operators
2025-03-14 06:43:46 -07:00
Markus Lehtonen
fba7fb6c94 compat/api: use GroupRule type
Simplify and rationalize the compat api. Many of the fields in Rule,
like Labels, Annotations or ExtendedResources are not applicable in this
context.
2025-03-14 13:40:57 +02:00
Feruzjon Muyassarov
b2f715e260
Apply modernize analysis improvements
Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@est.tech>
2025-03-13 22:55:02 +02:00
Markus Lehtonen
6fdad59072 nodefeaturegroup: add unit tests
Heavily based on nodefeaturerule unit tests.
2025-03-12 17:42:44 +02:00
Markus Lehtonen
96262a3784 nodefeaturegroup: implement vars
Implement handling of Vars and VarsTemplate fields or NodeFeatureGroup.
2025-03-12 17:42:44 +02:00
Markus Lehtonen
40cd7d41be test: fix erroneous assert 2025-03-12 14:32:34 +02:00
Feruzjon Muyassarov
20d280c11d
Replace golang.org/x/exp/maps with the standard library's maps package.
Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@est.tech>
2025-03-11 12:03:17 +02:00
Kubernetes Prow Robot
6a101422ee
Merge pull request from marquiz/devel/node-feature-group-match-status
Change ExecuteGroupRule to return detailed result
2025-03-06 05:03:44 -08:00
Marcin Franczyk
7ff00b3a02 Add Ge Le and GeLe operators
Signed-off-by: Marcin Franczyk <marcin0franczyk@gmail.com>
2025-03-04 12:56:53 +01:00
Markus Lehtonen
3b9bc575bc Change ExecuteGroupRule to return detailed result
Modify the ExecuteGroupRule() which is used for NodeFeatureGroups to
return detailed match status, similar to the Execute (used for
NodeFeatureRules). This prepares for using the simpler GroupRule type in
the image compatibility API.
2025-03-03 15:22:50 +02:00
Markus Lehtonen
4862d787e6 nodefeaturerule: refactor template handling
Use a common function for handling both LabelsTemplate and VarsTemplate
fields of NodeFeatureRule.
2025-03-03 15:11:35 +02:00
Marcin Franczyk
efc86e91a2 Bugfix: handle matchAny and matchFeatures when they appear in one spec
Signed-off-by: Marcin Franczyk <marcin0franczyk@gmail.com>
2025-03-03 11:52:37 +01:00
Fahrzin Hemmati
b0dbd11af7 Use Sprig template functions and add asLabelValue function 2025-02-19 01:51:32 -08:00
Kubernetes Prow Robot
797c66ffaa
Merge pull request from marquiz/devel/health-topology-updater
nfd-topology-updater: serve metrics and healthz on the same port
2025-02-17 02:02:22 -08:00
Kubernetes Prow Robot
26534880dd
Merge pull request from marquiz/devel/health-master
nfd-master: serve metrics and healthz endpoint on the same port
2025-02-17 01:22:22 -08:00
Markus Lehtonen
2e61519164 Update auto-generated code 2025-02-14 17:05:12 +02:00
Kubernetes Prow Robot
378d2fff0c
Merge pull request from mfranczy/image-compatibility-nfr
Refactoring of image compatibility node validator
2025-02-05 01:12:17 -08:00
Markus Lehtonen
0b0aed2318 nfd-master: serve metrics and healthz endpoint on the same port
Changes the gRPC health endpoint to plain http. At the same time starts
serving both the metrics and healthz endpoints on a single port.
Replaces the -metrics and -grpc-health command line flags with a single
-port flag.

Changes the Helm and kustomize deployments correspondingly.
2025-02-04 10:30:58 +02:00
Markus Lehtonen
0b9a8cf120 nfd-topology-updater: serve metrics and healthz on the same port
Changes the gRPC health endpoint to plain http. At the same time starts
serving both the metrics and healthz endpoints on a single port.
Replaces the -metrics and -grpc-health command line flags with a single
-port flag.

Changes the Helm and kustomize deployments correspondingly.
2025-02-04 10:30:26 +02:00
Marcin Franczyk
99d63d3d33 Refactoring of image compatibility node validator.
Additionally, testcases have been separated into distinct
functions for better readability.

Signed-off-by: Marcin Franczyk <marcin0franczyk@gmail.com>
2025-02-03 10:11:36 +01:00
Markus Lehtonen
850c544522 nfd-worker: add healthz endpoint 2025-01-31 07:52:13 +02:00
Markus Lehtonen
4959a13a07 nfd-worker: replace --metrics with --port
Use a single port for serving http. In addition to metrics we will have
the healthz endpoint.
2025-01-31 07:52:12 +02:00
Markus Lehtonen
25914ec06e nfd-worker: drop the gRPC health port
To be replaced with plain http.
2025-01-31 07:50:00 +02:00
Kubernetes Prow Robot
aea3be98e4
Merge pull request from TessaIO/test-improve-unit-tests-for-cr-constrictions
test: add utility for namespace labels patching and add the test cases for denyNodeFeatureLabels restriction
2025-01-27 00:05:24 -08:00
TessaIO
73b8711feb test: add utility for namespace labels patching and add the test cases for denyNodeFeatureLabels restriction
Signed-off-by: TessaIO <ahmedgrati1999@gmail.com>
2025-01-26 11:17:57 +01:00
Kubernetes Prow Robot
feea0e328e
Merge pull request from mfranczy/image-compatibility-nfr
Bugfixes for image compatibility feature
2025-01-09 23:58:31 -08:00
Marcin Franczyk
8db03fe0f8
Add unit tests for invalid feature in the compatibility spec
Signed-off-by: Marcin Franczyk <marcin0franczyk@gmail.com>
2025-01-09 10:16:34 +01:00
Kubernetes Prow Robot
3bedeaf546
Merge pull request from adrianchiris/fix-worker-role
Add support running with OwnerReferencesPermissionEnforcement
2025-01-08 05:58:30 -08:00
Marcin Franczyk
241c886bf9
Sort the list of compatibility artifacts in desc order
Signed-off-by: Marcin Franczyk <marcin0franczyk@gmail.com>
2025-01-08 14:00:09 +01:00
Marcin Franczyk
75ed142298
Fix image compatibility processing panic in case of a nil pointer
Signed-off-by: Marcin Franczyk <marcin0franczyk@gmail.com>
2025-01-08 13:59:08 +01:00
Marcin Franczyk
60b8a2136a
Allow for rule processing in case of a missing feature
Signed-off-by: Marcin Franczyk <marcin0franczyk@gmail.com>
2025-01-08 13:58:03 +01:00
adrianc
3f012c2d5a
Add support running with OwnerReferencesPermissionEnforcement
when OwnerReferencesPermissionEnforcement validating webhook is
enabled additional permissions are required to set/update owner ref
field. NFD worker sets/updates NodeFeature owner ref field to
the worker pod and owning daemonset.

owner reference can only be updated if the worker has delete permissions
for NodeFeatures.

if owner reference has blockOwnerDeletion (as the case for the daemonset
owner reference) then it requires update permissions to the finalizers
of the owner, to avoid this, we set blockOwnerDeleteion to false for all
owners referenced from NFD worker pod when setting/updating NodeFeature
owner ref.

Signed-off-by: adrianc <adrianc@nvidia.com>
2025-01-08 13:44:30 +02:00
Markus Lehtonen
98cd96312e Drop setup of grpc logging 2025-01-07 16:13:54 +02:00
Markus Lehtonen
97345a4a96
Merge branch 'master' into feat/skip-nodes 2024-12-20 10:38:44 +02:00
Kavin
6b0352a190 Remove error logs for nodes without nodefeatures 2024-12-18 23:27:26 +05:30
Marcin Franczyk
efc299ecf6 Introduce nfd client tool with a subset of image compatibility commands
Signed-off-by: Marcin Franczyk <marcin0franczyk@gmail.com>
2024-12-18 10:49:02 +01:00
Marcin Franczyk
51bbbe202d Extend NFR code with MatchStatus and introduce failFast strategy.
MatchStatus provides details about successful expressions and their results,
which are the matched host features. Additionally, a new flag controls
rule processing behavior: it can either stop at the first error or
continue processing all expressions and rules.

Signed-off-by: Marcin Franczyk <marcin0franczyk@gmail.com>
2024-12-18 10:48:14 +01:00
Kubernetes Prow Robot
3e87c97ac2
Merge pull request from marquiz/devel/grpc-api-cleanup
Cleanup for NodeFeature API being GA
2024-12-13 15:14:26 +01:00
Markus Lehtonen
fc103a6028 Cleanup for NodeFeature API being GA
Drop references to the gRPC API and don't suggest that NodeFeatureAPI
could be disabled.

Also update the developer guide for instructions running nfd components
outside the cluster.
2024-12-13 15:40:46 +02:00
Kubernetes Prow Robot
caaac59eba
Merge pull request from ozhuraki/no-owner-refs
nfd-worker: Add an option to disable setting the owner references
2024-12-13 13:12:26 +01:00
Oleg Zhurakivskyy
f13ccb1fb5 nfd-master: check that namespace informer cache sync succeeded
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2024-12-02 12:46:25 +02:00
Oleg Zhurakivskyy
20ef877ab1 nfd-worker: Add an option to disable setting the owner references
In some cases it's desirable to control automatic garbage collection
of NodeFeature object.

Add an option to disable setting the owner references to Pod
for NodeFeature object.

Closes: 1817

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2024-11-28 16:50:10 +02:00