---
apiVersion: batch/v1
kind: CronJob
metadata:
  namespace: home-automation
  name: rtlamr-collect
spec:
  schedule: "0 0 * * *"
  concurrencyPolicy: "Forbid"
  successfulJobsHistoryLimit: 3
  failedJobsHistoryLimit: 5
  jobTemplate:
    spec:
      backoffLimit: 3
      ttlSecondsAfterFinished: 300
      template:
        spec:
          restartPolicy: OnFailure
          containers:
            - name: rtlamr-collect
              image: "${SECRET_DOCKER_PRIVATE_REGISTRY}/rtlamr-collect:0.0.8"
              envFrom:
                - secretRef:
                    name: rtlamr-collect
