---
apiVersion: batch/v1
kind: Job
metadata:
  generateName: container-kill-
  #namespace: litmus
spec:
  template:
    metadata:
      labels:
        experiment: container-kill
    spec:
      serviceAccountName: CHAOS_SERVICE_ACCOUNT
      restartPolicy: Never
      containers:
      - name: ansibletest
        image: openebs/ansible-runner:ci
        imagePullPolicy: Always
        env:
          - name: ANSIBLE_STDOUT_CALLBACK
            value: default

          - name: APP_NAMESPACE
            value: default 

          - name: APP_LABEL
            value: 'app=nginx'

          - name: TARGET_CONTAINER
            value: "nginx"

          - name: CHAOSENGINE 
            value: "engine-nginx"

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

