---
apiVersion: batch/v1
kind: Job
metadata:
  name: litmus-cockroachdb
  namespace: litmus 
spec:
  template:
    metadata:
      name: litmus
   
    spec:
      serviceAccountName: litmus
      restartPolicy: Never
      containers:
      - name: ansibletest
        image: openebs/ansible-runner:ci
        imagePullPolicy: Always

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

          - name: PROVIDER_STORAGE_CLASS
            # Supported values: openebs-standard, local-storage
            value: openebs-standard

          - name: PROVIDER_PVC
            value: cockroachdb-claim

          - name: DEPLOY_TYPE
            value: statefulset
 
        command: ["/bin/bash"]
        args: ["-c", "ansible-playbook ./cockroachdb/deployers/cockroachdb-installer.yaml -i /etc/ansible/hosts -v; exit 0"]
