---
apiVersion: batch/v1
kind: Job
metadata:
  generateName: openebs-pool-network-
  namespace: litmus
spec:
  template:
    metadata:
      labels:
        name: openebs-pool-network
    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: TARGET_NAMESPACE
            value: openebs

          - name: APP_LABEL
            value: 'name=percona'

          - name: APP_PVC
            value: percona-mysql-claim

          - name: CHAOS_DURATION
            value: '35'

          - name: NETWORK_CHAOS
            value: loss=100

          - name: TARGET_CONTAINER
            value: cstor-pool

          - name: LIVENESS_APP_LABEL
            value: ""

          - name: LIVENESS_APP_NAMESPACE
            value: ""

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