apiVersion: v1
kind: Pod
metadata:
  name: pod-test  
  labels:
    key: pod-test
spec:
  restartPolicy: Never
  terminationGracePeriodSeconds: 10
  containers:      
    - 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"]
      ports:
        - containerPort: 8089
          name: web
        - containerPort: 5557
          name: cluster
        - containerPort: 5558
          name: communication
      env:
        - name: "LOCUST_LOCUSTFILE"
          value: "/target/app/OnceUser.py"
        - name: "LOCUST_HOST"
          value: "https:www.google.com"        
        - name: "LOCUST_USERS"
          value: "2"
        - name: "LOCUST_HATCH_RATE"
          value: "2"
        - name: "LOCUST_MODE_MASTER"
          value: "false"
        - name: "LOCUST_CSV"
          value: "report"
        - name: "LOCUST_HEADLESS"
          value: "true"        
        - name: "LOCUST_RUN_TIME"
          value: "1m"
        - name: "PYTHONPATH"
          value: "/target"
        - name: "LOCUST_EXIT_CODE_ON_ERROR"
          value: "0"
        - name: "LOCUST_LOGFILE"
          value: "/reports/locust.log"
        - name: "VERB"
          value: "GET"
