microservices-demo/kubernetes-manifests/loadgenerator.yaml
Ahmet Alp Balkan 8c3d36d81e loadgenerator prototype
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-06-29 16:37:01 -07:00

27 lines
666 B
YAML

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: loadgenerator
spec:
template:
metadata:
labels:
app: loadgenerator
spec:
initContainers:
- name: wait-frontend
image: alpine:3.6
command: ['sh', '-c', 'until wget -qO- "http://${FRONTEND_ADDR}"; do echo "waiting for ${FRONTEND_ADDR}"; sleep 2; done;']
containers:
- name: server
image: loadgenerator
env:
- name: FRONTEND_ADDR
value: "frontend:8080"
resources:
requests:
cpu: 100m
memory: 64Mi
limits:
cpu: 200m
memory: 128Mi