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:
parent
61dd04992b
commit
8cfb88bf2f
7 changed files with 28 additions and 31 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue