apiVersion: apps/v1
kind: Deployment
metadata:
  name: load-driver
  labels:
    app: wordpress
    tier: load-driver
spec:
  replicas: 1
  selector:
    matchLabels:
      app: wordpress
      tier: load-driver
  template:
    metadata:
      labels:
        app: wordpress
        tier: load-driver
    spec:
      initContainers:
      - image: appropriate/curl
        imagePullPolicy: IfNotPresent
        name: wait-until-wordpress-up
        args:
        - "sh"
        - "-c"
        - "while ! curl --connect-timeout 2 'wordpress:80' ; do sleep 1 ; done"
      containers:
      - image: centminmod/docker-centos6-siege
        name: siege
        args:
        - "siege"
        - "--benchmark"
        - "--time=24H"
        - "http://wordpress:80"
