apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: build-terminator
spec:
  schedule: "*/5 * * * *"
  # Keep a handful of pods around so we can look at logs if necessary.
  successfulJobsHistoryLimit: 10
  failedJobsHistoryLimit: 10
  jobTemplate:
    spec:
      template:
        spec:
          # Don't bother restarting the pod because it'll get scheduled again
          # in 5 minutes.
          restartPolicy: Never
          containers:
            - name: build-terminator
              image: infra.docker.zooxlabs.com/ci/build_terminator/terminator:production
              # We reuse the same image tag so the image needs to be pulled
              # every time in case it has changed.
              imagePullPolicy: Always
