---
apiVersion: batch/v1
kind: Job
metadata:
  generateName: cstor-cspc-csi-migration-
  namespace: e2e
spec:
  template:
    metadata:
      name: e2e
      labels:
        app: cspc-csi-migration
    spec:
      serviceAccountName: e2e
      restartPolicy: Never
      containers:
      - name: ansibletest
        image: openebs/upgrade-e2e:ci
        imagePullPolicy: IfNotPresent

        env:
          - name: ANSIBLE_STDOUT_CALLBACK
            #value: log_plays, actionable, default
            value: default
            
            # Namespace where OpenEBS is deployed
          - name: OPERATOR_NS
            value: ""

            # Image tag for operator version
          - name: OPERATOR_IMAGE_TAG
            value: ""

            # Image tag for migration Job
          - name: MIGRATATION_IMAGE_TAG
            value: ""
             
            # set to "true" if you want to upgrade cStor CSPC pool
          - name: MIGRATE_SPC_POOL
            value: ""

            # set to "true" if you want to upgrade CSI volumes        
          - name: MIGRATE_CSTOR_VOLUME
            value: ""

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