apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: nox-data-updates
spec:
  schedule: "0 0 20 * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: nox-data-updates
              image: registry.xdavidwu.link/placeholder2
              command: ['/bin/sh']
              args:
                - -c
                - >
                  cd /srv/http/nox &&
                  env UPDATE_MONTH_FROM=auto php8 artisan db:seed --force --class=MonthlyValueSeeder
              volumeMounts:
                - name: configs
                  mountPath: /srv/http/nox/.env
                  subPath: .env.updater
          volumes:
            - name: configs
              configMap:
                name: configs
          restartPolicy: OnFailure
