021660bb95
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
39 lines
979 B
YAML
39 lines
979 B
YAML
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: loadgenerator
|
|
spec:
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: loadgenerator
|
|
spec:
|
|
terminationGracePeriodSeconds: 5
|
|
restartPolicy: Always
|
|
initContainers:
|
|
- name: wait-frontend
|
|
image: alpine:3.6
|
|
command: ['sh', '-c', 'set -x; apk add --no-cache curl;
|
|
until timeout -t 2 curl -f "http://${FRONTEND_ADDR}"; do
|
|
echo "waiting for http://${FRONTEND_ADDR}";
|
|
sleep 2;
|
|
done;']
|
|
env:
|
|
- name: FRONTEND_ADDR
|
|
value: "frontend:80"
|
|
containers:
|
|
- name: main
|
|
image: gcr.io/istio-next/loadgenerator
|
|
env:
|
|
- name: FRONTEND_ADDR
|
|
value: "frontend:80"
|
|
- name: USERS
|
|
value: "10"
|
|
resources:
|
|
requests:
|
|
cpu: 300m
|
|
memory: 256Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|