Skip to content

Commit

Permalink
Merge pull request #1130 from marquiz/devel/tdx
Browse files Browse the repository at this point in the history
source/cpu: don't create cpu-security.tdx.total_keys label
  • Loading branch information
k8s-ci-robot authored Apr 14, 2023
2 parents 84c348b + 3320c74 commit cb604b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion docs/usage/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ option of nfd-worker.
| **`cpu-security.sgx.enabled`** | true | Set to 'true' if Intel SGX is enabled in BIOS (based a non-zero sum value of SGX EPC section sizes).
| **`cpu-security.se.enabled`** | true | Set to 'true' if IBM Secure Execution for Linux (IBM Z & LinuxONE) is available and enabled (requires `/sys/firmware/uv/prot_virt_host` facility)
| **`cpu-security.tdx.enabled`** | true | Set to 'true' if Intel TDX is available on the host and has been enabled (requires `/sys/module/kvm_intel/parameters/tdx`).
| **`cpu-security.tdx.total_keys`** | int | The total amount of keys an Intel TDX enabled host can provide, based on the `/sys/fs/cgroup/misc.capacity` information.
| **`cpu-security.sev.enabled`** | true | Set to 'true' if ADM SEV is available on the host and has been enabled (requires `/sys/module/kvm_intel/parameters/sev`).
| **`cpu-security.sev.es.enabled`** | true | Set to 'true' if ADM SEV-ES is available on the host and has been enabled (requires `/sys/module/kvm_intel/parameters/sev_es`).
| **`cpu-security.sev.snp.enabled`**| true | Set to 'true' if ADM SEV-SNP is available on the host and has been enabled (requires `/sys/module/kvm_intel/parameters/sev_snp`).
Expand Down
8 changes: 7 additions & 1 deletion source/cpu/cpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"os"
"strconv"

"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/klog/v2"

"github.com/klauspost/cpuid/v2"
Expand Down Expand Up @@ -173,8 +174,13 @@ func (s *cpuSource) GetLabels() (source.FeatureLabels, error) {
}

// Security
// skipLabel lists features that will not have labels created but are only made available for
// NodeFeatureRules (e.g. to be published via extended resources instead)
skipLabel := sets.NewString("tdx.total_keys")
for k, v := range features.Attributes[SecurityFeature].Elements {
labels["security."+k] = v
if !skipLabel.Has(k) {
labels["security."+k] = v
}
}

// SGX
Expand Down

0 comments on commit cb604b8

Please sign in to comment.