apiVersion: v1
kind: Pod
metadata:
  name: spark-deployment
  namespace: default
spec:
  containers:
  - name: spark-example
    image: intelanalytics/bigdl-ppml-trusted-big-data-ml-scala-occlum:2.1.0-SNAPSHOT
    imagePullPolicy: Never
    volumeMounts:
    - name: sgx-enclave
      mountPath: /dev/sgx/enclave
    - name: sgx-provision
      mountPath: /dev/sgx/provision
    - name: aesm
      mountPath: /var/run/aesmd
    - name: data-exchange
      mountPath: /opt/occlum_spark/data
    securityContext:
      privileged: true
    env:
    - name: DRIVER_MEMORY
      value: "5g"
    - name: SGX_MEM_SIZE
      value: "12GB"
    - name: SGX_THREAD
      value: "128"
    - name: SGX_HEAP
      value: "512MB"
    - name: SGX_KERNEL_HEAP
      value: "1GB"
  volumes:
  - name: sgx-enclave
    hostPath:
      path: /dev/sgx_enclave
  - name: sgx-provision
    hostPath:
      path: /dev/sgx_provision
  - name: aesm
    hostPath:
      path: /var/run/aesmd
  - name: data-exchange
    hostPath:
      path: /tmp
