mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
9a02b544a2
Separate feature discovery and creation of feature labels. Generalize the feature discovery so that network devices can be matched in custom label rules in a similar fashion as pci and usb devices. Available attributes for matching are: - operstate - speed - sriov_numvfs - sriov_totalvfs Labels created by the network feature source are unchanged. The new features being detected are available in custom rules only. Example custom rule: - name: "my network rule" labels: my-network-feature: "true" matchFeatures: - feature: network.device matchExpressions: "operstate": { op: In, value: ["up"] } "sriov_numvfs": { op: Gt, value: ["9"] } Also, add minimalist unit test. |
||
---|---|---|
.. | ||
network.go | ||
network_test.go |