# TODO
# Change test container 
---
apiVersion: batch/v1
kind: Job
metadata:
  name: litmus
  namespace: litmus 
spec:
  template:
    metadata:
      name: litmus
    spec:
      serviceAccountName: litmus
      restartPolicy: Never
      containers:
      - name: ansibletest
        image: ksatchit/ansibletest
        env: 
          - name: ANSIBLE_STDOUT_CALLBACK
            value: log_plays
 
          - name: PROVIDER_STORAGE_CLASS
            value: openebs-standard
            #value: local-storage

          - name: APP_NODE_SELECTOR
            value: kubeminion-01  

        command: ["/bin/bash"]
        args: ["-c", "ansible-playbook ./mysql/mysql_storage_benchmark/test.yaml -i /etc/ansible/hosts -v; exit 0"]
        volumeMounts:
          - name: logs 
            mountPath: /var/log/ansible 
        tty: true
      - name: logger
        image: openebs/logger
        command: ["/bin/bash"]
        args: ["-c", "./logger.sh -d 10 -r maya,openebs,pvc,percona; exit 0"] 
        volumeMounts:
          - name: kubeconfig 
            mountPath: /root/admin.conf
            subPath: admin.conf
          - name: logs
            mountPath: /mnt 
        tty: true 
      volumes: 
        - name: kubeconfig
          configMap: 
            name: kubeconfig 
        - name: logs 
          hostPath:
            path: /mnt
            type: Directory 

