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
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 #2065 from marquiz/devel/node-feature-group-match-status
...
Change ExecuteGroupRule to return detailed result
2025-03-06 05:03:44 -08: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 #1947 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 #1946 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 #2028 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 #1990 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 #2010 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 #2006 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 #1976 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 #1860 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
Kubernetes Prow Robot
443913e019
Merge pull request #1956 from googs1025/chore/add_metrics_prefix
...
chore: add metrics system prefix
2024-11-28 09:00:59 +00:00
googs1025
e631a52374
chore: add metrics system prefix
2024-11-28 09:57:40 +08:00
Markus Lehtonen
2220b99621
pkg/utils: drop fswatcher
...
Dead code.
2024-11-26 14:40:53 +02:00
Markus Lehtonen
45f49d574a
nfd-master: drop resourceLabels
...
Drop the resourceLabels config file option and the corresponding
-resource-labels command line flag. They were deprecated in NFD v0.13 so
it's time to let them go. NodeFeatureRule(s) should be used to manage
ERs, instead.
2024-11-07 15:16:52 +02:00
Carlos Eduardo Arango Gutierrez
62f4eddce6
Drop support for hooks
...
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
2024-11-04 14:50:07 +01:00
Kubernetes Prow Robot
b997ade5b3
Merge pull request #1942 from marquiz/devel/drop-grpc
...
nfd-master: drop stale unreachable deprecation notices
2024-11-04 11:16:31 +01:00
Kubernetes Prow Robot
1c6ce897f2
Merge pull request #1816 from marquiz/devel/gc-test-assert-msg
...
tests: better assertion message in nfd-gc unit tests
2024-10-31 19:33:27 +00:00
Markus Lehtonen
ca85075972
nfd-master: use Typed* workqueue types
...
Drop the usage of deprecated functions and types, makes linters happy.
2024-10-30 12:25:16 +02:00
Carlos Eduardo Arango Gutierrez
0bd82cf82a
Drop NFD gRPC API
...
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
2024-10-29 15:15:18 +01:00
Kubernetes Prow Robot
fd2893e2a5
Merge pull request #1592 from AhmedThresh/feat-configure-cr-restrictions
...
feat/nfd-master: configure CR restrictions
2024-10-24 12:20:54 +01:00
Markus Lehtonen
db07fe1ff4
nfd-gc: drop one duplicate import from tests
2024-09-27 15:26:18 +03:00