---
apiVersion: batch/v1
kind: Job
metadata:
  generateName: cstor-block-device-pool-provision-
  namespace: litmus
spec:
  template:
    metadata:
      name: litmus
      labels:
        app: cstor-block-device-pool-provision
    spec:
      serviceAccountName: litmus
      restartPolicy: Never
      containers:
      - name: ansibletest
        image: openebs/ansible-runner:ci
        imagePullPolicy: IfNotPresent

        env:
          - name: ANSIBLE_STDOUT_CALLBACK
            #value: log_plays, actionable, default
            value: default

            # Provide name POOL_NAME for the cstor-pool
          - name: POOL_NAME
            value: cstor-block-disk-pool

           # Provide the value for POOL_TYPE 
           # Supported values: striped, mirrored, raidz ,raidz2
          - name: POOL_TYPE
            value: striped
            
           # Provide the name of STORAGE_CLASS 
          - name: STORAGE_CLASS
            value: openebs-cstor-disk

          - name: OPERATOR_NS
            value: openebs

          - name: DEVICE_CAPACITY
            value: "20Gi"

          - name: SPC_MAXPOOL_COUNT
            value: "3"

          - name: DEPLOY_MODE
            value: create

          - name: THICK_PROVISIONING
            value: "false"
        
        command: ["/bin/bash"]
        args: ["-c", "ansible-playbook ./providers/cstor/cstor-block-device-pool/test.yml -i /etc/ansible/hosts -v; exit 0"]

