---
apiVersion: batch/v1
kind: Job
metadata:
  generateName: e2e-scale-jiva-replica-
  namespace: e2e 
spec:
  template:
    metadata:
      name: e2e
      labels:
        app: scaleup-jiva-replica-e2e
   
    spec:
      serviceAccountName: e2e
      restartPolicy: Never
      containers:
      - name: ansibletest
        image: openebs/ansible-runner:ci
        imagePullPolicy: IfNotPresent

        env: 
          - name: ANSIBLE_STDOUT_CALLBACK 
            value: default

          - name: APP_LABEL
            value: ''

          - name: APP_NAMESPACE
            value: 'app-percona-ns'
          
          - name: PVC_NAME
            value: 'percona-mysql-claim'

          - name: OPERATOR_NS
            value: 'openebs'  
            
            #Supported values are {controller, replica}
            # Will have no impact if variable is undefined i.e; will not induce any failure
          - name: COMPONENT_FAILURE
            value: ''

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