---
apiVersion: batch/v1
kind: Job
metadata:
  generateName: e2e-jiva-vol-resize-
  namespace: e2e
spec:
  template:
    metadata:
      name: e2e
      labels:
        app: e2e-jiva-vol-resize

    spec:
      serviceAccountName: e2e
      restartPolicy: Never
      containers:
      - name: ansibletest
        image: openebs/ansible-runner:ci
        imagePullPolicy: IfNotPresent

        env:
          - name: ANSIBLE_STDOUT_CALLBACK
            value: default

            # Application namespace
          - name: APP_NAMESPACE
            value: ''

            # Application pvc
          - name: APP_PVC
            value: '' 

            # Application label
          - name: APP_LABEL
            value: ''

            # Current storage capacity of volume
          - name: PV_CAPACITY
            value: 5G
          
            # Desired storage capacity of volume
          - name: NEW_CAPACITY
            value: 8G

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