summaryrefslogtreecommitdiffhomepage
path: root/test/e2e/untrusted-workload/usage.sh
blob: db820696484b58f19a48c7ad0a5b9225d56673d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash

# A sample script for testing the gvisor-containerd-shim # using untrusted
# workload extension.

set -ex

{ # Step 1: Pull the nginx image
sudo crictl pull nginx
}

{ # Step 2: Create sandbox.json
cat <<EOF | tee sandbox.json
{
    "metadata": {
        "name": "nginx-sandbox",
        "namespace": "default",
        "attempt": 1,
        "uid": "hdishd83djaidwnduwk28bcsb"
    },
    "annotations": {
      "io.kubernetes.cri.untrusted-workload": "true"
    },
    "linux": {
    },
    "log_directory": "/tmp"
}
EOF
}

{ # Step 3: Create the sandbox
SANDBOX_ID=$(sudo crictl runp sandbox.json)
}