2018-06-29 23:35:57 +00:00
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: loadgenerator
|
|
|
|
spec:
|
2018-06-30 00:10:28 +00:00
|
|
|
replicas: 1
|
2018-06-29 23:35:57 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: loadgenerator
|
|
|
|
spec:
|
2018-06-30 20:14:20 +00:00
|
|
|
terminationGracePeriodSeconds: 5
|
2018-06-30 00:10:28 +00:00
|
|
|
restartPolicy: Always
|
2018-06-29 23:35:57 +00:00
|
|
|
initContainers:
|
|
|
|
- name: wait-frontend
|
|
|
|
image: alpine:3.6
|
2018-06-30 00:10:28 +00:00
|
|
|
command: ['sh', '-c', 'set -x; apk add --no-cache curl;
|
|
|
|
until curl -f "http://${FRONTEND_ADDR}"; do
|
|
|
|
echo "waiting for http://${FRONTEND_ADDR}";
|
|
|
|
sleep 2;
|
|
|
|
done;']
|
|
|
|
env:
|
|
|
|
- name: FRONTEND_ADDR
|
|
|
|
value: "frontend:80"
|
2018-06-29 23:35:57 +00:00
|
|
|
containers:
|
2018-06-30 00:10:28 +00:00
|
|
|
- name: main
|
2018-07-08 00:14:52 +00:00
|
|
|
image: gcr.io/istio-next/loadgenerator
|
2018-06-29 23:35:57 +00:00
|
|
|
env:
|
|
|
|
- name: FRONTEND_ADDR
|
2018-06-30 00:10:28 +00:00
|
|
|
value: "frontend:80"
|
|
|
|
- name: USERS
|
2018-07-09 19:57:14 +00:00
|
|
|
value: "10"
|
2018-06-29 23:35:57 +00:00
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: 100m
|
|
|
|
memory: 64Mi
|
|
|
|
limits:
|
|
|
|
cpu: 200m
|
|
|
|
memory: 128Mi
|