-
Notifications
You must be signed in to change notification settings - Fork 18
feat: add bare metal support for Intel TDX and AMD SEV-SNP #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
butler54
merged 20 commits into
validatedpatterns:main
from
butler54:baremetal-tp-releases-squashed
May 5, 2026
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
bad2552
feat: add bare metal support for Intel TDX and AMD SEV-SNP
butler54 95fbf78
feat: update baremetal values to use released charts
butler54 708c94c
feat: add TDX kernel flag and enable intel-dcap for baremetal
butler54 6dadcca
fix: remove unused runtime class, kernel params, and commented-out te…
butler54 188c674
Merge branch 'main' into baremetal-tp-releases-squashed
butler54 fbce1aa
feat: update to OSC 1.12 / Trustee 1.1.0
butler54 5e8dd2a
Merge branch 'main' into baremetal-tp-releases-squashed
butler54 ccaee96
feat: integrate Kyverno and update trustee config for baremetal
butler54 a601af0
fix: set clusterGroupName to baremetal for deployment testing
butler54 cccc080
fix: add UPDATE operation to initdata injection policy
butler54 27c71e5
feat: add intel-device-plugins-operator subscription for SGX/TDX quot…
butler54 e462936
fix: enable TDX config in trustee to point QCNL at local PCCS service
butler54 20b2b73
feat: store raw SHA-256 hash alongside PCR8 hash in initdata ConfigMaps
butler54 98d4a1b
fix: point trustee at feature branch for baremetal attestation testing
butler54 070ca0e
fix: increase kata VM memory for kbs-access to 8192MB
butler54 68457d0
fix: target Pods only for cc_init_data injection, disable autogen
butler54 d61db58
fix: use ${initial_pcr} braces in PCR8 hash computation
butler54 7186b35
docs: address PR #73 review comments and merge PR #75 documentation
butler54 b6b19af
fix: revert clusterGroupName to simple for main branch merge
butler54 72d3d24
fix: update trustee chart to use upstream 0.3.3 release
butler54 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| - name: Detect and configure runtime class | ||
| hosts: localhost | ||
| connection: local | ||
| gather_facts: false | ||
| tasks: | ||
| - name: Check for Intel TDX nodes | ||
| kubernetes.core.k8s_info: | ||
| api_version: v1 | ||
| kind: Node | ||
| label_selectors: | ||
| - intel.feature.node.kubernetes.io/tdx=true | ||
| register: tdx_nodes | ||
|
|
||
| - name: Check for AMD SEV-SNP nodes | ||
| kubernetes.core.k8s_info: | ||
| api_version: v1 | ||
| kind: Node | ||
| label_selectors: | ||
| - amd.feature.node.kubernetes.io/snp=true | ||
| register: snp_nodes | ||
|
|
||
| - name: Set runtime handler for Intel TDX | ||
|
butler54 marked this conversation as resolved.
Outdated
|
||
| ansible.builtin.set_fact: | ||
| kata_handler: "kata-tdx" | ||
| kata_overhead: | ||
| memory: "350Mi" | ||
| cpu: "250m" | ||
| tdx.intel.com/keys: "1" | ||
| kata_node_selector: | ||
| intel.feature.node.kubernetes.io/tdx: "true" | ||
| when: tdx_nodes.resources | length > 0 | ||
|
|
||
| - name: Set runtime handler for AMD SEV-SNP | ||
| ansible.builtin.set_fact: | ||
| kata_handler: "kata-snp" | ||
| kata_overhead: | ||
| memory: "350Mi" | ||
| cpu: "250m" | ||
| kata_node_selector: | ||
| amd.feature.node.kubernetes.io/snp: "true" | ||
| when: snp_nodes.resources | length > 0 | ||
|
|
||
| - name: Create kata-cc RuntimeClass | ||
| kubernetes.core.k8s: | ||
| state: present | ||
| definition: | ||
| apiVersion: node.k8s.io/v1 | ||
| kind: RuntimeClass | ||
| metadata: | ||
| name: kata-cc | ||
| handler: "{{ kata_handler }}" | ||
| overhead: | ||
| podFixed: "{{ kata_overhead }}" | ||
| scheduling: | ||
| nodeSelector: "{{ kata_node_selector }}" | ||
| when: kata_handler is defined | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| apiVersion: v2 | ||
| description: Bare metal platform configuration (NFD rules, MachineConfigs, RuntimeClasses, Intel device plugin). | ||
| keywords: | ||
| - pattern | ||
| - upstream | ||
| - sandbox | ||
| - baremetal | ||
| name: baremetal | ||
| version: 0.0.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [hypervisor.qemu] | ||
| kernel_params="agent.aa_kbc_params=cc_kbc::http://kbs-trustee-operator-system.{{ .Values.global.hubClusterDomain }}" | ||
|
butler54 marked this conversation as resolved.
Outdated
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| apiVersion: nfd.openshift.io/v1alpha1 | ||
| kind: NodeFeatureRule | ||
| metadata: | ||
| name: consolidated-hardware-features | ||
| namespace: openshift-nfd | ||
| spec: | ||
| rules: | ||
| - name: "runtime.kata" | ||
| labels: | ||
| feature.node.kubernetes.io/runtime.kata: "true" | ||
| matchAny: | ||
| - matchFeatures: | ||
| - feature: cpu.cpuid | ||
| matchExpressions: | ||
| SSE42: { op: Exists } | ||
| VMX: { op: Exists } | ||
| - feature: kernel.loadedmodule | ||
| matchExpressions: | ||
| kvm: { op: Exists } | ||
| kvm_intel: { op: Exists } | ||
| - matchFeatures: | ||
| - feature: cpu.cpuid | ||
| matchExpressions: | ||
| SSE42: { op: Exists } | ||
| SVM: { op: Exists } | ||
| - feature: kernel.loadedmodule | ||
| matchExpressions: | ||
| kvm: { op: Exists } | ||
| kvm_amd: { op: Exists } | ||
|
|
||
| - name: "amd.sev-snp" | ||
| labels: | ||
| amd.feature.node.kubernetes.io/snp: "true" | ||
| extendedResources: | ||
| sev-snp.amd.com/esids: "@cpu.security.sev.encrypted_state_ids" | ||
| matchFeatures: | ||
| - feature: cpu.cpuid | ||
| matchExpressions: | ||
| SVM: { op: Exists } | ||
| - feature: cpu.security | ||
| matchExpressions: | ||
| sev.snp.enabled: { op: Exists } | ||
|
|
||
| - name: "intel.sgx" | ||
| labels: | ||
| intel.feature.node.kubernetes.io/sgx: "true" | ||
| extendedResources: | ||
| sgx.intel.com/epc: "@cpu.security.sgx.epc" | ||
| matchFeatures: | ||
| - feature: cpu.cpuid | ||
| matchExpressions: | ||
| SGX: { op: Exists } | ||
| SGXLC: { op: Exists } | ||
| - feature: cpu.security | ||
| matchExpressions: | ||
| sgx.enabled: { op: IsTrue } | ||
| - feature: kernel.config | ||
| matchExpressions: | ||
| X86_SGX: { op: Exists } | ||
|
|
||
| - name: "intel.tdx" | ||
| labels: | ||
| intel.feature.node.kubernetes.io/tdx: "true" | ||
| extendedResources: | ||
| tdx.intel.com/keys: "@cpu.security.tdx.total_keys" | ||
| matchFeatures: | ||
| - feature: cpu.cpuid | ||
| matchExpressions: | ||
| VMX: { op: Exists } | ||
| - feature: cpu.security | ||
| matchExpressions: | ||
| tdx.enabled: { op: Exists } | ||
|
|
||
| - name: "ibm.se.enabled" | ||
| labels: | ||
| ibm.feature.node.kubernetes.io/se: "true" | ||
| matchFeatures: | ||
| - feature: cpu.security | ||
| matchExpressions: | ||
| se.enabled: { op: IsTrue } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| {{- range list "master" "worker" }} | ||
| --- | ||
| apiVersion: machineconfiguration.openshift.io/v1 | ||
| kind: MachineConfig | ||
| metadata: | ||
| labels: | ||
| machineconfiguration.openshift.io/role: {{ . }} | ||
| name: 96-kata-kernel-config-{{ . }} | ||
| namespace: openshift-machine-config-operator | ||
| spec: | ||
| config: | ||
| ignition: | ||
| version: 3.2.0 | ||
| storage: | ||
| files: | ||
| - contents: | ||
| source: 'data:text/plain;charset=utf-8;base64,{{ tpl ($.Files.Get "bm-kernel-params.yaml") $ | b64enc }}' | ||
| mode: 420 | ||
| overwrite: true | ||
| path: /etc/kata-containers/snp/config.d/96-kata-kernel-config | ||
| {{- end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| apiVersion: nfd.openshift.io/v1 | ||
| kind: NodeFeatureDiscovery | ||
| metadata: | ||
| name: nfd-instance | ||
| namespace: openshift-nfd | ||
| spec: | ||
| operand: | ||
| image: registry.redhat.io/openshift4/ose-node-feature-discovery-rhel9:v4.20 | ||
| imagePullPolicy: Always | ||
| servicePort: 12000 | ||
| workerConfig: | ||
| configData: | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # apiVersion: node.k8s.io/v1 | ||
| # kind: RuntimeClass | ||
| # metadata: | ||
| # name: kata-snp | ||
| # handler: kata-snp | ||
| # overhead: | ||
| # podFixed: | ||
| # memory: "350Mi" | ||
| # cpu: "250m" | ||
| # scheduling: | ||
| # nodeSelector: | ||
| # amd.feature.node.kubernetes.io/snp: "true" |
13 changes: 13 additions & 0 deletions
13
charts/all/baremetal/templates/runtimeclass-intel-tdx.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # apiVersion: node.k8s.io/v1 | ||
| # kind: RuntimeClass | ||
| # metadata: | ||
| # name: kata-tdx | ||
| # handler: kata-tdx | ||
| # overhead: | ||
| # podFixed: | ||
| # memory: "350Mi" | ||
| # cpu: "250m" | ||
| # tdx.intel.com/keys: 1 | ||
| # scheduling: | ||
| # nodeSelector: | ||
| # intel.feature.node.kubernetes.io/tdx: "true" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| {{- range list "master" "worker" }} | ||
| --- | ||
| apiVersion: machineconfiguration.openshift.io/v1 | ||
| kind: MachineConfig | ||
| metadata: | ||
| labels: | ||
| machineconfiguration.openshift.io/role: {{ . }} | ||
| name: 99-enable-coco-{{ . }} | ||
| spec: | ||
| kernelArguments: | ||
| - nohibernate | ||
| config: | ||
| ignition: | ||
| version: 3.2.0 | ||
| storage: | ||
| files: | ||
| - path: /etc/modules-load.d/vsock.conf | ||
| mode: 0644 | ||
| contents: | ||
| source: data:text/plain;charset=utf-8;base64,dnNvY2stbG9vcGJhY2sK | ||
| {{- end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # No configurable values — platform resources use fixed configurations. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| apiVersion: v2 | ||
| description: Intel DCAP services (PCCS and QGS) for TDX remote attestation. | ||
| keywords: | ||
| - pattern | ||
| - intel | ||
| - tdx | ||
| - pccs | ||
| - qgs | ||
| name: intel-dcap | ||
| version: 0.0.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,11 @@ | ||||||
| apiVersion: deviceplugin.intel.com/v1 | ||||||
| kind: SgxDevicePlugin | ||||||
| metadata: | ||||||
| name: sgxdeviceplugin-sample | ||||||
| spec: | ||||||
| image: registry.connect.redhat.com/intel/intel-sgx-plugin@sha256:f2c77521c6dae6b4db1896a5784ba8b06a5ebb2a01684184fc90143cfcca7bf4 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated to the requested digest in commit 7186b35 ✅ |
||||||
| enclaveLimit: 110 | ||||||
| provisionLimit: 110 | ||||||
| logLevel: 4 | ||||||
| nodeSelector: | ||||||
| intel.feature.node.kubernetes.io/sgx: "true" | ||||||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.