---
apiVersion: batch/v1
kind: Job
metadata:
  generateName: ingress-nginx-check
  namespace: litmus
spec:
  template:
    metadata:
      name: litmus
      labels:
        app: ingress-nginx-check-litmus
    spec:
      serviceAccountName: litmus
      restartPolicy: Never
      containers:
      - name: ansibletest
        image: mayadataio/dop-validator:ci
        imagePullPolicy: Always
        env:
          - name: ANSIBLE_STDOUT_CALLBACK
            value: default  
          - name: NAMESPACE
            value: ingress-nginx              
        command: ["/bin/bash"]
        args: ["-c", "ansible-playbook ./litmus/director/ingress-nginx/test.yaml -i /etc/ansible/hosts -v; exit 0"]
      imagePullSecrets:
      - name: oep-secret