Skip to content

Commit

Permalink
k8s: add overlay to deploy with a custom Intel DCAP config
Browse files Browse the repository at this point in the history
Signed-off-by: Mikko Ylinen <[email protected]>
  • Loading branch information
mythi authored and fitzthum committed May 1, 2024
1 parent 65ee7e1 commit 52833c7
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
10 changes: 10 additions & 0 deletions kbs/config/kubernetes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ Once you deploy the KBS, you can use the services' nodeport and the Kubernetes n
echo $(kubectl get nodes -o jsonpath='{.items[0].status.addresses[0].address}'):$(kubectl get svc kbs -n coco-tenant -o jsonpath='{.spec.ports[0].nodePort}')
```

## Optional: Use custom Intel DCAP configuration

If you would like to override the default `sgx_default_qcnl.conf` in the KBS/AS images, copy/configure one into `custom_pccs/` directory and deploy using:

```bash
export DEPLOYMENT_DIR=custom_pccs
```

NB: this currently builds on `nodeport` kustomization.

## Deploy KBS

Deploy KBS by running the following command:
Expand Down
17 changes: 17 additions & 0 deletions kbs/config/kubernetes/custom_pccs/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: coco-tenant

resources:
- ../nodeport

patches:
- path: set_custom_pccs.yaml
target:
kind: Deployment
name: kbs

configMapGenerator:
- files:
- sgx_default_qcnl.conf
name: dcap-attestation-conf
20 changes: 20 additions & 0 deletions kbs/config/kubernetes/custom_pccs/set_custom_pccs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: kbs
spec:
template:
spec:
containers:
- name: kbs
volumeMounts:
- name: qplconf
mountPath: /etc/sgx_default_qcnl.conf
subPath: sgx_default_qcnl.conf
volumes:
- name: qplconf
configMap:
name: dcap-attestation-conf
items:
- key: sgx_default_qcnl.conf
path: sgx_default_qcnl.conf
1 change: 1 addition & 0 deletions kbs/config/kubernetes/custom_pccs/sgx_default_qcnl.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"collateral_service": "https://api.trustedservices.intel.com/sgx/certification/v4/"}

0 comments on commit 52833c7

Please sign in to comment.