apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: s3-object-expirer-cron-job
  namespace: assisted-installer
spec:
  schedule: "@hourly"
  successfulJobsHistoryLimit: 0
  failedJobsHistoryLimit: 1
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: s3-object-expirer-job-pod
            image: REPLACE_IMAGE
            imagePullPolicy: Always
            envFrom:
              - configMapRef:
                  name: s3-config
            args:
            - /bin/bash
            - -c
            -  python ./expirer.py
            resources:
              limits:
                cpu: 200m
                memory: 200Mi
              requests:
                cpu: 100m
                memory: 100Mi
          restartPolicy: OnFailure
      backoffLimit: 3
