---
apiVersion: batch/v1
kind: Job
metadata:
  generateName: upgrade-zfs-localpv-
  namespace: litmus
spec:
  template:
    metadata:
      name: litmus
      labels:
        name: zfs-localpv-upgrade
    spec:
      serviceAccountName: litmus
      restartPolicy: Never
      containers:
      - name: ansibletest
        image: openebs/ansible-runner:ci
        imagePullPolicy: IfNotPresent
        env:
          - name: ANSIBLE_STDOUT_CALLBACK
            #value: log_plays
            value: default

            ## Give the versioned branch name for zfs_localPV provisioner from openebs/zfs-localpv repo
            ## for e.g. (v0.6.x , v0.5.x  OR  master)
          - name: TO_VERSION_ZFS_BRANCH
            value: ''

            ## Provide ZFS_DRIVER image to which upgrade is to done. To use ci images use ci tag.
            ## Give full image name (for e.g. quay.io/openebs/zfs-driver:<tag>)
          - name: TO_VERSION_ZFS_DRIVER_IMAGE
            value: ''

          - name: OPERATOR_NAMESPACE
            value: ''

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