-
Notifications
You must be signed in to change notification settings - Fork 2
/
run.sh
executable file
·28 lines (23 loc) · 956 Bytes
/
run.sh
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
#!/bin/bash
set -eou pipefail
# for example, export KIND_IMAGE=kindest/node:v1.16.2
# leave it empty for default
KIND_IMAGE=${KIND_IMAGE:-}
SCRIPT_ROOT=${SCRIPT_ROOT:-https://github.com/appscodelabs/e2e-test-setup/raw/kind-v0.6.1}
configfile=$(mktemp /tmp/kind.XXXXXX.yaml)
curl -fsSL ${SCRIPT_ROOT}/kubernetes/kind.yaml > $configfile
function cleanup() {
rm -rf $configfile
}
trap cleanup EXIT
kind create cluster --config $configfile --name kind --image=$KIND_IMAGE --wait 300s
echo
echo "waiting for nodes to be ready ..."
kubectl wait --for=condition=Ready nodes --all --timeout=5m
kubectl get nodes
echo
echo "installing local-path provisioner ..."
kubectl delete storageclass --all
kubectl apply -f https://github.com/rancher/local-path-provisioner/raw/v0.0.11/deploy/local-path-storage.yaml
kubectl wait --for=condition=Ready pods -n local-path-storage --all --timeout=5m
kubectl apply -f ${SCRIPT_ROOT}/kubernetes/storageclass/standard.yaml