apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: backend-cron
spec:
  concurrencyPolicy: Replace
  failedJobsHistoryLimit: 1
  jobTemplate:
    spec:
      activeDeadlineSeconds: 120
      backoffLimit: 1
      template:
        spec:
          containers:
            - args:
                - /bin/bash
                - -c
                - php artisan schedule:run
              envFrom:
                - configMapRef:
                    name: backend-config
              image: changeme
              imagePullPolicy: Always
              name: artisan-schedule
              resources:
                limits:
                  cpu: 200m
                  memory: 200M
                requests:
                  cpu: 100m
                  memory: 100M
          restartPolicy: Never
  schedule: "*/1 * * * *"
  startingDeadlineSeconds: 30
  successfulJobsHistoryLimit: 1
