---
apiVersion: batch/v1
kind: Job
metadata:
  generateName: openebs-single-replica-failure-
  namespace: litmus
spec:
  template:
    metadata:
      labels:
        name: openebs-single-replica-failure
    spec:
      serviceAccountName: litmus
      restartPolicy: Never
      containers:
      - name: ansibletest
        image: openebs/ansible-runner:ci
        imagePullPolicy: IfNotPresent
        env:
          - name: ANSIBLE_STDOUT_CALLBACK
            value: default

          ## Namespace where the application is deployed.
          - name: APP_NAMESPACE
            value: app-cass-ns 
          
          ## Label of application pod whose replica has to be killed.  
          - name: APP_LABEL
            value: 'app=cassandra'

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