apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: anticompositebot.catwatch
  labels:
    name: anticompositebot.catwatch
    # The toolforge=tool label will cause $HOME and other paths to be mounted from Toolforge
    toolforge: tool
spec:
  schedule: "0 0 * * *"
  concurrencyPolicy: Forbid
  successfulJobsHistoryLimit: 0
  jobTemplate:
    spec:
      backoffLimit: 2
      template:
        metadata:
          labels:
            toolforge: tool
        spec:
          containers:
          - name: catwatch
            image: docker-registry.tools.wmflabs.org/toolforge-python39-sssd-base:latest
            command: [
              "/data/project/anticompositebot/AntiCompositeBot/venv/bin/python3",
              "/data/project/anticompositebot/AntiCompositeBot/src/catwatch.py"
            ]
            args: []
            workingDir: /data/project/anticompositebot
            env:
            - name: HOME
              value: /data/project/anticompositebot
            - name: LOG_SMTP
              value: "True"
            imagePullPolicy: Always
          restartPolicy: OnFailure
