1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-09 10:17:04 +00:00
node-feature-discovery/pkg/apis/nfd/v1alpha1
Markus Lehtonen b2d9e15a00 apis/nfd: drop the private template caching fields
Drop the private fields – that were supposed to be used for caching parsed
templates – from the Rule type. Keep the API typedefs cleaner and
simpler. Moreover, the caching was not even used in practice,
effectively complicating code without any benefit: the way the types
are used in nfd-master creates a local copy of Rule type storing the
cached template in the copy, wasting it from any future users.

There are also other possible caveats in caching like we tried to do it.
For example the objects returned by the api lister are supposed to be
treated as read-only - in particular if we would be to modify them there
should at least be proper locking in place as nfd-master potentially
processes the same rule (the same Go object) in parallel for multiple
nodes. If any optimization like this will be pursued it should be done
properly, probably with private type(s) at the consumer's end, not
contaminating the API types.
2023-12-15 10:48:07 +02:00
..
annotations_labels.go Discover node features as annotations 2023-10-25 19:58:58 +02:00
doc.go apis/nfd: migrate pkg/api/feature 2022-10-15 07:42:20 +03:00
expression.go apis/nfd: drop creation helper functions 2023-12-14 15:54:51 +02:00
expression_test.go apis/nfd: drop creation helper functions 2023-12-14 15:54:51 +02:00
feature.go Use generics for maps and slices 2023-12-13 12:09:53 +02:00
feature_test.go apis/nfd: add unit tests for Feature type 2023-04-25 19:40:35 +03:00
generate.sh apis/nfd: migrate pkg/api/feature 2022-10-15 07:42:20 +03:00
generated.pb.go update re-generated code with make-generate results 2023-03-11 22:15:11 +02:00
generated.proto update re-generated code with make-generate results 2023-03-11 22:15:11 +02:00
register.go apis/nfd: add CRD for communicating node features 2022-12-14 07:31:28 +02:00
rule.go apis/nfd: drop the private template caching fields 2023-12-15 10:48:07 +02:00
rule_test.go apis/nfd: drop the private template caching fields 2023-12-15 10:48:07 +02:00
types.go apis/nfd: drop the private template caching fields 2023-12-15 10:48:07 +02:00
zz_generated.deepcopy.go apis/nfd: drop the private template caching fields 2023-12-15 10:48:07 +02:00