-
Notifications
You must be signed in to change notification settings - Fork 97
/
configmap.yaml
51 lines (42 loc) · 1.04 KB
/
configmap.yaml
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
apiVersion: v1
kind: ConfigMap
metadata:
name: loadtest
namespace: {{ .namespace }}
data:
dependency.sh: |-
#!/bin/sh
export ETCDCTL_API=3
while true
do
MEMBERS=$(etcdctl --endpoints=http://etcd:2379 member list)
echo $MEMBERS | grep -i started && exit 0
echo "Waiting for etcd to start..."
sleep 10
done
entrypoint.sh: |-
#!/bin/bash
echo "Getting etcd benchmark..."
go get go.etcd.io/etcd/tools/benchmark
echo "Starting etcd benchmark..."
benchmark \
--endpoints=etcd:2379 \
--conns=100 \
--clients=500 \
put \
--key-size=256 \
--sequential-keys \
--total=800000 \
--val-size=512 \
| tee benchmark.log
echo "benchmark existed with error code $?"
echo "cat benchmark.log"
cat benchmark.log
grep "Error distribution" benchmark.log
ERROR=$?
if [ $ERROR -eq 0 ]; then
echo "Benchmark run completed with errors."
exit 255
fi
echo "Benchmark run completed without errors."
exit 0