apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: queue-housekeeping-cronjob
spec:
  schedule: "*/15 * * * *"
  concurrencyPolicy: Forbid
  failedJobsHistoryLimit: 5
  startingDeadlineSeconds: 600
  successfulJobsHistoryLimit: 5
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: housekeeping
              image: ghcr.io/ministryofjustice/hmpps-devops-tools
              args:
                - /bin/sh
                - -c
                - curl -XPUT --connect-timeout 5 --max-time 10 --retry 5 --retry-delay 0 --retry-max-time 40 http://hmpps-allocations/queue-admin/retry-all-dlqs
          restartPolicy: Never