loadgenerator: exit faster on SIGTERM

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
Ahmet Alp Balkan 2018-07-15 16:34:41 -07:00
parent 457e2edbdf
commit 021660bb95
2 changed files with 2 additions and 1 deletions

View File

@ -15,7 +15,7 @@ spec:
- name: wait-frontend
image: alpine:3.6
command: ['sh', '-c', 'set -x; apk add --no-cache curl;
until curl -f "http://${FRONTEND_ADDR}"; do
until timeout -t 2 curl -f "http://${FRONTEND_ADDR}"; do
echo "waiting for http://${FRONTEND_ADDR}";
sleep 2;
done;']

View File

@ -1,5 +1,6 @@
#!/bin/bash
set -e
trap "exit" TERM
if [[ -z "${FRONTEND_ADDR}" ]]; then
echo >&2 "FRONTEND_ADDR not specified"