---
apiVersion: batch/v1
kind: Job
metadata:
  generateName: e2e-prometheus-liveness-
  namespace: e2e
spec:
  activeDeadlineSeconds: 5400
  template:
    metadata:
      name: e2e-prometheus-liveness
      namespace: e2e
      labels:
        liveness: e2e-prometheus-liveness
    spec:
      serviceAccountName: e2e
      restartPolicy: Never
 
      containers:
      - name: ansibletest
        image: openebs/ansible-runner:ci
        imagePullPolicy: IfNotPresent
        env: 
          - name: ANSIBLE_STDOUT_CALLBACK
            value: default

          - name: LIVENESS_TIMEOUT_SECONDS
            value: "10"

          # number of retries when livenss-fails 
          - name: LIVENESS_RETRY_COUNT
            value: "5"
          
          - name: LIVENESS_PERIOD_SECONDS
            value: "5"

          # Namespace in which prometheus is running
          - name: APP_NAMESPACE
            value: 'app-prometheus'

          # Service port
          - name: PORT
            value: '9090'

        command: ["/bin/bash"]
        args: ["-c", "ansible-playbook ./apps/prometheus/liveness/test.yml -i /etc/ansible/hosts -v; exit 0"]

           
         

