---
apiVersion: batch/v1
kind: Job
metadata:
  generateName: litmus-busybox-deploy-
  namespace: litmus
spec:
  template:
    metadata:
      name: litmus
      labels:
        app: busybox-litmus
    spec:
      serviceAccountName: litmus
      restartPolicy: Never
      containers:
      - name: ansibletest
        image: openebs/lvm-localpv-e2e:ci
        imagePullPolicy: IfNotPresent
        env:
          - name: ANSIBLE_STDOUT_CALLBACK
            value: default

            # Name of the storage class to use for volume provisioning
          - name: STORAGE_CLASS  
            value: ''
           
            # This is the namespace where busybox application will be deployed 
          - name: APP_NAMESPACE
            value: ''

            # Application label for busybox deployment/statefulset in `key=value` format
          - name: APP_LABEL
            value: ''

            # Application PVC name
          - name: APP_PVC
            value: ''

            # Persistent volume storage capacity (for e.g, 5Gi)
          - name: PV_CAPACITY
            value: ''

            # Use: `statefuleset` to deploy busybox application as statefulset
            # Use: `deployment` to deploy busybox application as deployment
          - name: DEPLOY_TYPE
            value: ''
                      
            # Use: `provision` to deploy the application
            # Use: `deprovision` to deprovision the application
          - name: ACTION
            value: ''

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