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
#!/usr/bin/env bash
# Runs the PoC against a hosted tenant cluster: obtain a kubeconfig, run
# four steps in a Job, copy outputs back, and print the result.
set -euo pipefail
ROOT=$(cd "$(dirname "$0")/.." && pwd)
OUT=${OUT:-$HOME/.tmp/knotless-runner-k8s}
CLUSTER=${CLUSTER:-knotless-poc}
KUBECONFIG_PATH=$OUT/tenant/$CLUSTER.kubeconfig.yaml
mkdir -p "$OUT/outputs"
if [ ! -s "$KUBECONFIG_PATH" ] || [ "${FORCE_SIGNIN:-0}" = 1 ]; then
KUBECONFIG_PATH=$(CLUSTER="$CLUSTER" "$ROOT/scripts/tenant-kubeconfig.sh")
fi
export KUBECONFIG=$KUBECONFIG_PATH
kubectl get nodes
cd "$ROOT"
cargo run --quiet -- run \
--name "$CLUSTER" \
--runner did:plc:runner \
--image busybox:1.36 \
--workdir examples \
--steps-file examples/steps.tsv \
--outputs "$OUT/outputs" \
--result "$OUT/result.json" \
--log "$OUT/run.log" \
--timeout 900
echo "result: $OUT/result.json"
echo "log: $OUT/run.log"
echo "outputs: $OUT/outputs"