# requirements sut-service.sut 48100
# requirements sut-deployment.sut
apiVersion: v1
kind: Pod
metadata:
  name: pod-test
  namespace: trial
  labels:
    key: pod-test
spec:
  restartPolicy: Never
  terminationGracePeriodSeconds: 60
  volumes:
    - name: common-storage
      emptyDir: {}  
  containers:      
    - name: sidecar
      image: nginx
      volumeMounts:
        - name: common-storage
          mountPath: /reports
    - name: performance
      image: f4phantom.skylab:5000/whitebox:latest
      imagePullPolicy: Always
      command: ["/bin/sh"]
      args: ["-c", "locust && cp /target/app/report_failures.csv /reports && cp /target/app/report_stats.csv /reports && cp /target/app/report_stats_history.csv /reports"]
      volumeMounts:
        - name: common-storage
          mountPath: /reports
      ports:
        - containerPort: 8089
          name: web
        - containerPort: 5557
          name: cluster
        - containerPort: 5558
          name: communication
      env:
        - name: "LOCUST_LOCUSTFILE"
          value: "__case__"
        - name: "LOCUST_HOST"
          value: "__host__"        
        - name: "LOCUST_USERS"
          value: "__users__"
        - name: "LOCUST_HATCH_RATE"
          value: "__rate__"
        - name: "LOCUST_MODE_MASTER"
          value: "false"
        - name: "LOCUST_CSV"
          value: "report"
        - name: "LOCUST_HEADLESS"
          value: "true"        
        - name: "LOCUST_RUN_TIME"
          value: "__run_time__"
        - name: "PYTHONPATH"
          value: "/target"
        - name: "LOCUST_EXIT_CODE_ON_ERROR"
          value: "0"
        - name: "LOCUST_LOGFILE"
          value: "/reports/locust.log"
        - name: "VERB"
          value: "__verb__"




