-
Notifications
You must be signed in to change notification settings - Fork 16
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
Changes from 17 commits
bad2552
95fbf78
708c94c
6dadcca
188c674
fbce1aa
5e8dd2a
ccaee96
a601af0
cccc080
27c71e5
e462936
20b2b73
98d4a1b
070ca0e
68457d0
d61db58
7186b35
b6b19af
72d3d24
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 |
| 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 } |
| 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: | |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| {{- range list "master" "worker" }} | ||
| --- | ||
| apiVersion: machineconfiguration.openshift.io/v1 | ||
| kind: MachineConfig | ||
| metadata: | ||
| labels: | ||
| machineconfiguration.openshift.io/role: {{ . }} | ||
| name: 99-enable-coco-{{ . }} | ||
| spec: | ||
| kernelArguments: | ||
| - nohibernate | ||
| {{- if $.Values.tdx.enabled }} | ||
| - kvm_intel.tdx=1 | ||
| {{- end }} | ||
| 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 }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| tdx: | ||
| enabled: true |
| 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 |
| 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" | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: pccs | ||
| namespace: intel-dcap | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app: pccs | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: pccs | ||
| trustedservices.intel.com/cache: pccs | ||
| spec: | ||
| tolerations: | ||
| - effect: NoSchedule | ||
| key: node-role.kubernetes.io/master | ||
| operator: Exists | ||
| serviceAccountName: pccs-service-account | ||
| {{- if .Values.baremetal.pccs.nodeSelector }} | ||
| nodeSelector: | ||
| kubernetes.io/hostname: {{ .Values.baremetal.pccs.nodeSelector }} | ||
| {{- end }} | ||
| initContainers: | ||
| - name: init-seclabel | ||
| image: registry.access.redhat.com/ubi9/ubi:9.7-1764578509 | ||
| command: [ "sh", "-c", "chcon -Rt container_file_t /var/cache/pccs" ] | ||
| volumeMounts: | ||
| - name: host-database | ||
| mountPath: /var/cache/pccs | ||
| securityContext: | ||
| runAsUser: 0 | ||
| runAsGroup: 0 | ||
| privileged: true # Required for chcon to work on host files | ||
| containers: | ||
| - name: pccs | ||
| image: registry.redhat.io/openshift-sandboxed-containers/osc-pccs@sha256:de64fc7b13aaa7e466e825d62207f77e7c63a4f9da98663c3ab06abc45f2334d | ||
|
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. Probably this should be also updated to newest one https://catalog.redhat.com/en/software/containers/openshift-sandboxed-containers/osc-pccs/69173baa2fa58c9e4c54171e
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 latest osc-pccs digest (v1.12, sha256:edf57087) in commit 7186b35 ✅ |
||
| envFrom: | ||
| - secretRef: | ||
| name: pccs-secrets | ||
| env: | ||
| - name: "PCCS_LOG_LEVEL" | ||
| value: "info" | ||
| - name: "CLUSTER_HTTPS_PROXY" | ||
| value: "" | ||
| - name: "PCCS_FILL_MODE" | ||
| value: "LAZY" | ||
| ports: | ||
| - containerPort: 8042 | ||
| name: pccs-port | ||
| volumeMounts: | ||
| - name: pccs-tls | ||
| mountPath: /opt/intel/pccs/ssl_key | ||
| readOnly: true | ||
| - name: host-database | ||
| mountPath: /var/cache/pccs/ | ||
| securityContext: | ||
| runAsUser: 0 | ||
| volumes: | ||
| - name: pccs-tls | ||
| secret: | ||
| secretName: pccs-tls | ||
| - name: host-database | ||
| hostPath: | ||
| path: /var/cache/pccs/ | ||
| type: DirectoryOrCreate | ||
Uh oh!
There was an error while loading. Please reload this page.