apiVersion: batch/v1
kind: CronJob
metadata:
  name: update-course-variant-statuses
  labels:
    needs-db: "job"
spec:
  schedule: "0 3 * * *"
  startingDeadlineSeconds: 900
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      activeDeadlineSeconds: 1800
      template:
        metadata:
          annotations:
            linkerd.io/inject: enabled
        spec:
          restartPolicy: OnFailure
          containers:
            - name: update-course-variant-statuses
              image: headless-lms
              imagePullPolicy: IfNotPresent
              command:
                - cargo
                - run
                - --bin
                - update-course-variant-statuses
              envFrom:
                - secretRef:
                    name: headless-lms-secrets
              resources:
                requests:
                  memory: 200Mi
                  cpu: 200m
                limits:
                  memory: 500Mi
                  cpu: 500m
