---
apiVersion: batch/v1
kind: CronJob
metadata:
  name: ids-tester
  namespace: openshift-suricata
spec:
  failedJobsHistoryLimit: 5
  successfulJobsHistoryLimit: 3
  concurrencyPolicy: Replace
  schedule: "05 05 * * 3"
  jobTemplate:
    spec:
      template:
        spec:
          affinity:
            nodeAffinity:
              preferredDuringSchedulingIgnoredDuringExecution:
              - preference:
                  matchExpressions:
                  - key: topology.kubernetes.io/region
                    operator: In
                    values:
                    - us-gov-west-1
                    - us-gov-east-1
                weight: 1
          serviceAccountName: ids-test-sa
          restartPolicy: Never
          containers:
          - name: ids-tester
            image: quay.io/dedgar/ids-tester:v0.0.4
            imagePullPolicy: Always
            command: ["/usr/local/bin/start.sh"]
