apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: jailbot-job
spec:
  suspend: true
  schedule: "*/30 * * * *" # Run every half hour
  jobTemplate:
    spec:
      template:
        spec:
          restartPolicy: OnFailure
          containers:
          - name: jailbot
            image: bluetrack/jailbot:stable
            imagePullPolicy: Always
            env:
            - name: HTTP_ENABLED
              value: "false"
            volumeMounts:
            - name: data
              mountPath: /data
              subPath: jailbot_data
          
          volumes:
          - name: data
            persistentVolumeClaim:
              claimName: jailbot-data
          
