---
apiVersion: batch/v1
kind: Job
metadata:
  generateName: e2e-node-affinity-
  namespace: e2e 
spec:
  template:
    metadata:
      name: e2e
      labels:
        app: node-affinity
   
    spec:
      serviceAccountName: e2e
      restartPolicy: Never
      containers:
      - name: ansibletest
        image: openebs/jiva-csi-e2e:ci
        imagePullPolicy: IfNotPresent

        env: 
          - name: ANSIBLE_STDOUT_CALLBACK 
            value: default

          - name: APP_NAMESPACE
            value: 'app-pgres-ns'

          - name: APPLICATION_LABEL
            value: 'app=pgset'

          - name: PVC_NAME
            value: 'pgdata-claim'   

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