apiVersion: batch/v1
kind: CronJob
metadata:
  name: sparc-irb-job
  labels:
    app: sparc-irb-job
spec:
  schedule: "13 13 * * *"
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      template:
        metadata:
          labels:
            app: sparc-irb-job
        spec:
          restartPolicy: Never
          containers:
          - name: sparc
            image: example.edu/sparc_request:latest
            command: ["rails"]
            args: ["org:irbs:update"]
            imagePullPolicy: Always
            resources:
              requests:
                memory: 512Mi
                cpu: 50m
              limits:
                memory: 1024Mi
                cpu: 500m
            envFrom:
            - configMapRef:
                name: sparc
            - secretRef:
                name: sparc
