apiVersion: batch/v1
kind: Job
metadata:
  name: artilleryjob-$NO
  labels:
    env: test
    jobgroup: artillery
spec:
  ttlSecondsAfterFinished: 60
  template:
    metadata:
      name: artillery
      labels:
        jobgroup: artillery  
    spec:
      containers:
      - name: artillery
        image: peltops/gws_artillery:v3
        imagePullPolicy: Always
        env:
          - name: MINIO_ACCESS_KEY
            valueFrom:
              secretKeyRef:
                name: minio-creds-secret
                key: accesskey 
          - name: MINIO_SECRET_KEY
            valueFrom:
              secretKeyRef:
                name: minio-creds-secret
                key: secretkey           
        workingDir: /mnt/workspace
        command: [ "/bin/sh", "-c", "/mnt/workspace/artillery.sh" ]
        volumeMounts:
        - name: artilleryvol
          mountPath: "/etc/conf"
          readOnly: true
      volumes:
      - name: artilleryvol
        secret:
          secretName: artilleryconf  
      restartPolicy: Never  