Standardizes loadgen behavior for Istio mTLS=STRICT (#279)

* Adds liveness probe annotation, moves loadgen initcontainer into main

* cleanup

* cleanup

* updated wrong manifests

* respond to comments
This commit is contained in:
Megan O'Keefe 2019-12-16 09:30:23 -05:00 committed by GitHub
parent 61dd04992b
commit 8cfb88bf2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 28 additions and 31 deletions

View file

@ -15,4 +15,7 @@ COPY --from=builder /install /usr/local
COPY . .
RUN chmod +x ./loadgen.sh
RUN apt-get -qq update \
&& apt-get install -y --no-install-recommends \
curl
ENTRYPOINT ./loadgen.sh

View file

@ -24,4 +24,13 @@ if [[ -z "${FRONTEND_ADDR}" ]]; then
fi
set -x
# if one request to the frontend fails, then exit
STATUSCODE=$(curl --silent --output /dev/stderr --write-out "%{http_code}" http://${FRONTEND_ADDR})
if test $STATUSCODE -ne 200; then
echo "Error: Could not reach frontend - Status code: ${STATUSCODE}"
exit 1
fi
# else, run loadgen
locust --host="http://${FRONTEND_ADDR}" --no-web -c "${USERS:-10}" 2>&1