Skip to content

Commit be33bdb

Browse files
committed
fix: update for 1.11 release
Signed-off-by: Chris Butler <chris.butler@redhat.com>
1 parent 14afd1d commit be33bdb

5 files changed

Lines changed: 158 additions & 132 deletions

File tree

charts/coco-supported/baremetal/templates/pccs-deployment.yaml

Lines changed: 27 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
apiVersion: apps/v1
23
kind: Deployment
34
metadata:
@@ -14,51 +15,43 @@ spec:
1415
app: pccs
1516
trustedservices.intel.com/cache: pccs
1617
spec:
17-
serviceAccountName: pccs-service-account
1818
tolerations:
19-
- effect: NoSchedule
20-
key: node-role.kubernetes.io/master
21-
operator: Exists
22-
affinity:
23-
nodeAffinity:
24-
requiredDuringSchedulingIgnoredDuringExecution:
25-
nodeSelectorTerms:
26-
- matchExpressions:
27-
- key: node-role.kubernetes.io/master
28-
operator: Exists
29-
# Prefer to schedule on the same node as existing PCCS pods
30-
podAffinity:
31-
preferredDuringSchedulingIgnoredDuringExecution:
32-
- weight: 100
33-
podAffinityTerm:
34-
labelSelector:
35-
matchLabels:
36-
app: pccs
37-
topologyKey: kubernetes.io/hostname
19+
- effect: NoSchedule
20+
key: node-role.kubernetes.io/master
21+
operator: Exists
22+
nodeSelector:
23+
kubernetes.io/hostname: master-03 # THIS IS REALLLY REALLY BAD
3824
initContainers:
39-
- name: init-seclabel
40-
image: registry.access.redhat.com/ubi9/ubi:latest
41-
command: ["sh", "-c", "chcon -Rt container_file_t /var/cache/pccs"]
42-
volumeMounts:
43-
- name: host-database
44-
mountPath: /var/cache/pccs
45-
securityContext:
46-
runAsUser: 0
47-
runAsGroup: 0
48-
privileged: true # Required for chcon to work on host files
25+
- name: init-seclabel
26+
image: registry.access.redhat.com/ubi9/ubi:9.7-1764578509
27+
command: [ "sh", "-c", "chcon -Rt container_file_t /var/cache/pccs" ]
28+
volumeMounts:
29+
- name: host-database
30+
mountPath: /var/cache/pccs
31+
securityContext:
32+
runAsUser: 0
33+
runAsGroup: 0
34+
privileged: true # Required for chcon to work on host files
4935
containers:
5036
- name: pccs
51-
image: quay.io/openshift_sandboxed_containers/dcap/pccs:0.2.0
37+
image: registry.redhat.io/openshift-sandboxed-containers/osc-pccs@sha256:352fac8fb229177e52a3bc132b1e2a1a2af9f924a35f5efb1ab4aaef25fca720
38+
envFrom:
39+
- secretRef:
40+
name: pccs-secrets
41+
env:
42+
- name: "PCCS_LOG_LEVEL"
43+
value: "info"
44+
- name: "CLUSTER_HTTPS_PROXY"
45+
value: ""
46+
- name: "PCCS_FILL_MODE"
47+
value: "LAZY"
5248
ports:
5349
- containerPort: 8042
5450
name: pccs-port
5551
volumeMounts:
5652
- name: pccs-tls
5753
mountPath: /opt/intel/pccs/ssl_key
5854
readOnly: true
59-
- name: pccs-config
60-
mountPath: /opt/intel/pccs/config
61-
readOnly: true
6255
- name: host-database
6356
mountPath: /var/cache/pccs/
6457
securityContext:
@@ -67,9 +60,6 @@ spec:
6760
- name: pccs-tls
6861
secret:
6962
secretName: pccs-tls
70-
- name: pccs-config
71-
secret:
72-
secretName: pccs-config
7363
- name: host-database
7464
hostPath:
7565
path: /var/cache/pccs/
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
apiVersion: v1
2-
kind: ConfigMap
3-
metadata:
4-
name: qgs-config
5-
namespace: intel-dcap
6-
data:
7-
qgs.conf: |
8-
port = 4050
9-
number_threads = 4
1+
# apiVersion: v1
2+
# kind: ConfigMap
3+
# metadata:
4+
# name: qgs-config
5+
# namespace: intel-dcap
6+
# data:
7+
# qgs.conf: |
8+
# port = 4050
9+
# number_threads = 4
Lines changed: 55 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
---
2-
apiVersion: apps/v1
31
kind: DaemonSet
42
metadata:
53
name: tdx-qgs
64
namespace: intel-dcap
7-
annotations:
8-
argocd.argoproj.io/sync-wave: "2"
95
spec:
106
selector:
117
matchLabels:
@@ -16,35 +12,75 @@ spec:
1612
app: tdx-qgs
1713
annotations:
1814
sgx.intel.com/quote-provider: tdx-qgs
15+
qcnl-conf: '{"pccs_url": "https://pccs-service:8042/sgx/certification/v4/", "use_secure_cert": false, "pck_cache_expire_hours": 168}'
1916
spec:
20-
serviceAccountName: tdx-qgs-service-account
2117
nodeSelector:
2218
intel.feature.node.kubernetes.io/tdx: 'true'
2319
hostNetwork: true
2420
dnsPolicy: ClusterFirstWithHostNet
21+
initContainers:
22+
- name: platform-registration
23+
image: registry.redhat.io/openshift-sandboxed-containers/osc-tdx-qgs@sha256:2f8a49c51af8d801d0bc5a9ef4808afe5b6cc79157a1c618a0f8b3025b56d290
24+
restartPolicy: Always
25+
command: [ '/usr/bin/dcap-registration-flow' ]
26+
env:
27+
- name: PCCS_URL
28+
value: "https://pccs-service:8042"
29+
- name: SECURE_CERT
30+
value: 'false'
31+
envFrom:
32+
- secretRef:
33+
name: pccs-secrets
34+
securityContext:
35+
readOnlyRootFilesystem: true
36+
allowPrivilegeEscalation: true
37+
privileged: true
38+
capabilities:
39+
drop:
40+
- ALL
41+
add:
42+
- LINUX_IMMUTABLE
43+
volumeMounts:
44+
- name: efivars
45+
mountPath: /sys/firmware/efi/efivars
2546
containers:
2647
- name: tdx-qgs
27-
image: quay.io/openshift_sandboxed_containers/dcap/tdx-qgs:0.2.0
28-
workingDir: /opt/intel/tdx-qgs
48+
image: registry.redhat.io/openshift-sandboxed-containers/osc-tdx-qgs@sha256:2f8a49c51af8d801d0bc5a9ef4808afe5b6cc79157a1c618a0f8b3025b56d290
49+
args:
50+
- -p=4050
51+
- -n=4
2952
securityContext:
3053
readOnlyRootFilesystem: true
3154
allowPrivilegeEscalation: false
55+
capabilities:
56+
drop:
57+
- ALL
3258
resources:
3359
limits:
3460
sgx.intel.com/epc: "512Ki"
3561
sgx.intel.com/enclave: 1
3662
sgx.intel.com/provision: 1
63+
env:
64+
- name: QCNL_CONF_PATH
65+
value: "/run/dcap/qcnl_conf"
66+
- name: XDG_CACHE_HOME
67+
value: "/run/dcap/cache"
3768
volumeMounts:
38-
- name: qgs-config
39-
mountPath: /etc/qgs.conf
40-
subPath: qgs.conf
41-
- name: sgx-default-qcnl-conf
42-
mountPath: /etc/sgx_default_qcnl.conf
43-
subPath: sgx_default_qcnl.conf
69+
- name: dcap-qcnl-cache
70+
mountPath: /run/dcap/cache
71+
- name: qcnl-config
72+
mountPath: /run/dcap/
73+
readOnly: true
4474
volumes:
45-
- name: qgs-config
46-
configMap:
47-
name: qgs-config
48-
- name: sgx-default-qcnl-conf
49-
configMap:
50-
name: sgx-default-qcnl-conf
75+
- name: dcap-qcnl-cache
76+
emptyDir:
77+
sizeLimit: 50Mi
78+
- name: qcnl-config
79+
downwardAPI:
80+
items:
81+
- path: "qcnl_conf"
82+
fieldRef:
83+
fieldPath: metadata.annotations['qcnl-conf']
84+
- name: efivars
85+
hostPath:
86+
path: /sys/firmware/efi/efivars/
Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
1-
---
2-
# ServiceAccount for TDX QGS DaemonSet
3-
apiVersion: v1
4-
kind: ServiceAccount
5-
metadata:
6-
name: tdx-qgs-service-account
7-
namespace: intel-dcap
8-
annotations:
9-
argocd.argoproj.io/sync-wave: "1"
10-
---
11-
# Security Context Constraint for TDX QGS
12-
apiVersion: security.openshift.io/v1
13-
kind: SecurityContextConstraints
14-
metadata:
15-
name: tdx-qgs-scc
16-
annotations:
17-
kubernetes.io/description: "SCC for Intel TDX Quote Generation Service requiring host network access and SGX devices"
18-
argocd.argoproj.io/sync-wave: "1"
19-
allowHostDirVolumePlugin: false
20-
allowHostIPC: false
21-
allowHostNetwork: true
22-
allowHostPID: false
23-
allowHostPorts: false
24-
allowPrivilegedContainer: false
25-
allowedCapabilities: null
26-
defaultAddCapabilities: null
27-
fsGroup:
28-
type: MustRunAs
29-
priority: null
30-
readOnlyRootFilesystem: false
31-
requiredDropCapabilities:
32-
- KILL
33-
- MKNOD
34-
- SETPCAP
35-
- SYS_CHROOT
36-
runAsUser:
37-
type: MustRunAs
38-
uid: 1001
39-
seLinuxContext:
40-
type: MustRunAs
41-
supplementalGroups:
42-
type: RunAsAny
43-
users:
44-
- system:serviceaccount:intel-dcap:tdx-qgs-service-account
45-
volumes:
46-
- configMap
47-
- downwardAPI
48-
- emptyDir
49-
- persistentVolumeClaim
50-
- projected
51-
- secret
1+
# ---
2+
# # ServiceAccount for TDX QGS DaemonSet
3+
# apiVersion: v1
4+
# kind: ServiceAccount
5+
# metadata:
6+
# name: tdx-qgs-service-account
7+
# namespace: intel-dcap
8+
# annotations:
9+
# argocd.argoproj.io/sync-wave: "1"
10+
# ---
11+
# # Security Context Constraint for TDX QGS
12+
# apiVersion: security.openshift.io/v1
13+
# kind: SecurityContextConstraints
14+
# metadata:
15+
# name: tdx-qgs-scc
16+
# annotations:
17+
# kubernetes.io/description: "SCC for Intel TDX Quote Generation Service requiring host network access and SGX devices"
18+
# argocd.argoproj.io/sync-wave: "1"
19+
# allowHostDirVolumePlugin: false
20+
# allowHostIPC: false
21+
# allowHostNetwork: true
22+
# allowHostPID: false
23+
# allowHostPorts: false
24+
# allowPrivilegedContainer: false
25+
# allowedCapabilities: null
26+
# defaultAddCapabilities: null
27+
# fsGroup:
28+
# type: MustRunAs
29+
# priority: null
30+
# readOnlyRootFilesystem: false
31+
# requiredDropCapabilities:
32+
# - KILL
33+
# - MKNOD
34+
# - SETPCAP
35+
# - SYS_CHROOT
36+
# runAsUser:
37+
# type: MustRunAs
38+
# uid: 1001
39+
# seLinuxContext:
40+
# type: MustRunAs
41+
# supplementalGroups:
42+
# type: RunAsAny
43+
# users:
44+
# - system:serviceaccount:intel-dcap:tdx-qgs-service-account
45+
# volumes:
46+
# - configMap
47+
# - downwardAPI
48+
# - emptyDir
49+
# - persistentVolumeClaim
50+
# - projected
51+
# - secret
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
apiVersion: v1
2-
kind: ConfigMap
3-
metadata:
4-
name: sgx-default-qcnl-conf
5-
namespace: intel-dcap
6-
data:
7-
sgx_default_qcnl.conf: |
8-
{
9-
"pccs_url": "https://pccs-service:8042/sgx/certification/v4/",
10-
"use_secure_cert": false,
11-
"retry_times": 6,
12-
"retry_delay": 10,
13-
"pck_cache_expire_hours": 168,
14-
"verify_collateral_cache_expire_hours": 168,
15-
"local_cache_only": false
16-
}
1+
# apiVersion: v1
2+
# kind: ConfigMap
3+
# metadata:
4+
# name: sgx-default-qcnl-conf
5+
# namespace: intel-dcap
6+
# data:
7+
# sgx_default_qcnl.conf: |
8+
# {
9+
# "pccs_url": "https://pccs-service:8042/sgx/certification/v4/",
10+
# "use_secure_cert": false,
11+
# "retry_times": 6,
12+
# "retry_delay": 10,
13+
# "pck_cache_expire_hours": 168,
14+
# "verify_collateral_cache_expire_hours": 168,
15+
# "local_cache_only": false
16+
# }

0 commit comments

Comments
 (0)