1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00
node-feature-discovery/pkg/apis/nfd/v1alpha1
Markus Lehtonen 6160e80161 nfd-master: fix a crash when processing NodeFeatureRules
Fix a a bug where nfd-master with NodeFeature API enabled would crash
when NodeFeatureRule objects were processed in the case where no
NodeFeature objects existed. This was caused by trying to insert values
into a non-initialized NodeFeatureSpec in the code.

This patch adds two safety measures to prevent that from happening in
the future. First, add a constructor function for the NodeFeatureSpec
type, and second, check for uninitialized object in the function
inserting new functions.

TODO: add unit tests for the API helper functions.
2023-04-21 16:49:47 +00:00
..
annotations_labels.go Create extended resources with NodeFeatureRule 2023-04-07 16:14:56 +02:00
doc.go apis/nfd: migrate pkg/api/feature 2022-10-15 07:42:20 +03:00
expression.go apis/nfd: migrate pkg/api/feature 2022-10-15 07:42:20 +03:00
expression_test.go apis/nfd: migrate pkg/api/feature 2022-10-15 07:42:20 +03:00
feature.go nfd-master: fix a crash when processing NodeFeatureRules 2023-04-21 16:49:47 +00: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 Create extended resources with NodeFeatureRule 2023-04-07 16:14:56 +02:00
rule_test.go apis/nfd: fix NodeFeatureRule templating 2022-10-25 23:37:27 +03:00
types.go Create extended resources with NodeFeatureRule 2023-04-07 16:14:56 +02:00
zz_generated.deepcopy.go Create extended resources with NodeFeatureRule 2023-04-07 16:14:56 +02:00