1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-30 19:54:46 +00:00
node-feature-discovery/pkg/nfd-master
Markus Lehtonen 9523f1e411 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 19:24:08 +03:00
..
nfd-api-controller.go nfd-master: increase controller resync period to 1 hour 2023-04-12 16:38:47 +03:00
nfd-master-internal_test.go Merge pull request #1099 from ArangoGutierrez/extended_resources_v2 2023-04-07 08:09:15 -07:00
nfd-master.go nfd-master: fix a crash when processing NodeFeatureRules 2023-04-21 19:24:08 +03:00
nfd-master_test.go Add master config file 2023-04-03 09:52:09 +01:00