propeller logo
k8s

Elastic HAL Test

Test the Elastic TEE HAL via the Kubernetes operator

This runs the HAL test WASM module through the Propeller Kubernetes operator. It exercises the platform, crypto, clock, and random functions of the Elastic HAL interface.

Prerequisites

The operator must be deployed and a Proplet registered. Follow the end-to-end example first.

Proplet Configuration

kubectl patch proplet k8s-proplet --type=merge -p '{"spec":{"k8s":{"env":{"halEnabled":true,"externalWasmRuntime":""}}}}'

Build the WASM Module

cd propeller
make hal-test

Apply the Task

WASM_B64=$(base64 -w0 propeller/build/hal-test.wasm)
kubectl apply -n propeller-workloads -f - <<EOF
apiVersion: propeller.propeller.absmach.eu/v1
kind: Task
metadata:
  name: hal-test-example
spec:
  name: hal-test-example
  functionName: hal-test
  file: "${WASM_B64}"
  propletSelector:
    propletId: "k8s-proplet"
EOF

Watch and Verify

kubectl logs -n propeller-workloads deployment/k8s-proplet | grep -E "platform-info|random|sha256|keypair"

Expected output (stub mode):

platform-info: {"platform_type":"None","version":"0.0.0","attestation_support":false}
list-capabilities: [{"feature_name":"random","supported":true},...]
random(32): 8887fb92b56f95bf...
sha256("proplet-hal-test")=0990559c...
generate-keypair: ok (json len=162)

Reference

FieldValue
functionNamehal-test
daemonfalse
Proplet envhalEnabled: true, externalWasmRuntime: ""

On this page