Last active
May 5, 2020 17:02
-
-
Save cardil/da083db01e98f41326fcc3c833b94451 to your computer and use it in GitHub Desktop.
Test that stress large number of Serverless revisions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -Eeuo pipefail | |
readonly START="${START:-1}" | |
readonly LIMIT="${LIMIT:-1200}" | |
for NUM in $(seq "${START}" "$LIMIT"); do | |
oc apply -f - <<EOF | |
apiVersion: serving.knative.dev/v1 | |
kind: Service | |
metadata: | |
name: greeter | |
spec: | |
template: | |
spec: | |
containers: | |
- image: quay.io/rhdevelopers/knative-tutorial-greeter:quarkus | |
env: | |
- name: MESSAGE_PREFIX | |
value: Hey-${NUM} | |
livenessProbe: | |
httpGet: | |
path: /healthz | |
readinessProbe: | |
httpGet: | |
path: /healthz | |
EOF | |
oc wait --for=condition=Ready ksvc/greeter | |
url="$(oc get ksvc greeter -o jsonpath='{.status.url}' | sed 's/http:/https:/g')" | |
http get "$url" | |
http get "$url" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment