apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: addwork
spec:
  schedule: "*/5 * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: pi
            image: docker.io/wdenniss/pi_worker:v1
            command: ["python3",  "add_jobs.py"]
            imagePullPolicy: Always
            env:
            - name: REDIS_HOST
              value: redis-0.redis-service
            - name: PYTHONUNBUFFERED
              value: "1"
          restartPolicy: Never
      backoffLimit: 2
