apiVersion: apps/v1
kind: Deployment
metadata:
  name: locust-slave
spec:
  replicas: 10
  selector:
    matchLabels:
      name: locust-slave
  template:
    metadata:
      labels:
        name: locust-slave
        role: slave
    spec:
      volumes:
        - name: locust-volume
          configMap:
            name: locust-configmap
      containers:
        - name: locust
          image: locustio/locust:1.1.1
          env:
            - name: LOCUST_TARGET_HOST
              value: "https://api.nexon.co.kr"
          args:
            [
              "--worker",
              "--master-host",
              "locust-master",
              "-f",
              "/locust-tasks/basic.py",
            ]
          command: ["locust"]
          volumeMounts:
            - name: locust-volume
              mountPath: /locust-tasks
