apiVersion: v1
kind: ReplicationController
metadata:
  labels:
    name: load-generator-master
  name: load-generator-master
  namespace: default
spec:
  replicas: 1
  selector:
    name: load-generator-master
  template:
    metadata:
      labels:
        kubernetes.io/color: FF0000
        name: load-generator-master
    spec:
      containers:
      - command:
        - locust
        - -f
        - /scripts/locustfile.py
        - --master
        - --host=http://framework:9080
        env:
        - name: INFLUXDB_HOST
          value: influxdb
        - name: INFLUXDB_PORT
          value: "8086"
        - name: INFLUXDB_USER
          value: root
        - name: INFLUXDB_PASSWORD
          value: root
        - name: INFLUXDB_NAME
          value: k8s
        image: 172.16.16.15:5000/trogdor-load-generator:latest
        imagePullPolicy: Always
        name: load-generator-master
        ports:
        - containerPort: 8089
          protocol: TCP
        - containerPort: 5557
          protocol: TCP
        - containerPort: 5558
          protocol: TCP
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      nodeSelector:
        region: zone1
