apiVersion: batch/v1
kind: Job
metadata:
  name: {{ .Values.job_name }}
  namespace: {{ .Values.namespace }}
spec:
  template:
    spec:
      containers:
      - name: e2e
        image:  {{ .Values.e2e.image.ref }}
        command: ["go", "test", "-v", "-failfast", "-timeout", "50m", "./test/e2e/...", "-namespace=$(NAMESPACE)-operator", "-olmNamespace=$(NAMESPACE)", " -dummyImage=hang:10"]
        env:
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
      restartPolicy: Never
  backoffLimit: 1
