apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: auction-cron-job
spec:
  schedule: "*/2 * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: auction-cron-job
              image: luissaybe/auction
              imagePullPolicy: Always
              command: ["python3", "-u", "-m", "auction.cron.certify_item"]
              env:
                - name: DB_URL
                  valueFrom:
                    secretKeyRef:
                      name: postgres-cluster-secret
                      key: db_url
          restartPolicy: OnFailure
