---
apiVersion: batch/v1
kind: Job
metadata:
  generateName: node-storage-fill-
  namespace: litmus
spec:
  template:
    metadata:
      labels:
        name: node-storage-fill
    spec:
      serviceAccountName: litmus
      restartPolicy: Never
      #nodeSelector:
      #  kubernetes.io/hostname:

      tolerations:
      - key: "infra-aid"
        operator: "Equal"
        value: "observer"
        effect: "NoSchedule"
      containers:
      - name: ansibletest
        image: openebs/ansible-runner:ci
        imagePullPolicy: Always
        env:
          - name: ANSIBLE_STDOUT_CALLBACK
            #value: log_plays
            #value: actionable
            value: default

          - name: PROVIDER_STORAGE_CLASS
            value: openebs-cstor-sparse

          - name: APP_NAMESPACE
            value: app-busybox-ns 

          - name: SPC_NAME
            value: cstor-sparse-pool

        command: ["/bin/bash"]
        args: ["-c", "ansible-playbook ./experiments/chaos/node_storage_fill/test.yml -i /etc/ansible/hosts -vv; exit 0"]

