---
apiVersion: batch/v1
kind: Job
metadata:
  generateName: cstor-verify-rebuild-
  namespace: litmus
spec:
  template:
    metadata:
      labels:
        name: cstor-verify-rebuild
    spec:
      serviceAccountName: litmus
      restartPolicy: Never
      containers:
      - name: ansibletest
        image: openebs/ansible-runner:ci
        env:
          - name: ANSIBLE_STDOUT_CALLBACK
            #value: log_plays
            #value: actionable
            value: default

          - name: APP_NAMESPACE
            value: app-percona-ns

          - name: APP_LABEL
            value: 'name=percona'

          - name: APP_PVC
            value: percona-mysql-claim

#          - name: NETWORK_DELAY
#            value: "300" # in seconds

          - name: LIVENESS_APP_LABEL
            value: ""

          - name: LIVENESS_APP_NAMESPACE
            value: ""

        command: ["/bin/bash"]
        args: ["-c", "ansible-playbook ./experiments/chaos/cstor_verify_rebuild/test.yml -i /etc/ansible/hosts -vv; exit 0"]
