1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-05 08:17:04 +00:00
node-feature-discovery/source
Fabiano Fidêncio 10672e1bba cpu: Expose the total number of keys for TDX
The total amount of keys that can be used on a specific TDX system is
exposed via the cgroups misc.capacity. See:

```
$ cat /sys/fs/cgroup/misc.capacity
tdx 31
```

The first step to properly manage the amount of keys present in a node
is exposing it via the NFD, and that's exactly what this commit does.

An example of how it ends up being exposed via the NFD:

```
$ kubectl get node 984fee00befb.jf.intel.com -o jsonpath='{.metadata.labels}'  | jq | grep tdx.total_keys
  "feature.node.kubernetes.io/cpu-security.tdx.total_keys": "31",
```

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-03-31 09:12:26 +02:00
..
cpu cpu: Expose the total number of keys for TDX 2023-03-31 09:12:26 +02:00
custom apis/nfd: flatten the structure of features data type 2022-10-18 18:37:28 +03:00
fake apis/nfd: flatten the structure of features data type 2022-10-18 18:37:28 +03:00
kernel apis/nfd: flatten the structure of features data type 2022-10-18 18:37:28 +03:00
local apis/nfd: flatten the structure of features data type 2022-10-18 18:37:28 +03:00
memory apis/nfd: flatten the structure of features data type 2022-10-18 18:37:28 +03:00
network apis/nfd: flatten the structure of features data type 2022-10-18 18:37:28 +03:00
pci apis/nfd: flatten the structure of features data type 2022-10-18 18:37:28 +03:00
storage apis/nfd: flatten the structure of features data type 2022-10-18 18:37:28 +03:00
system Add common utility function for getting node name 2022-12-23 09:50:15 +02:00
usb source/usb: scan host sysfs 2022-10-24 20:53:10 +03:00
mock_LabelSource.go update re-generated code with make-generate results 2023-03-11 22:15:11 +02:00
source.go apis/nfd: flatten the structure of features data type 2022-10-18 18:37:28 +03:00
source_test.go pkg/api/feature: rename types 2022-10-06 11:25:01 +03:00