apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: sentimentbot
spec:
  schedule: "0 * * * *"
  concurrencyPolicy: Forbid
  successfulJobsHistoryLimit: 1
  failedJobsHistoryLimit: 1
  startingDeadlineSeconds: 300
  jobTemplate:
    spec:
      parallelism: 1
      template:
        metadata:
          labels:
            app: sentimentbot
        spec:
          containers:
            - name: sentimentbot
              resources:
                limits:
                  memory: 900Mi
                requests:
                  cpu: 100m
                  memory: 900Mi
              image: bjorskog/sentimentbot:latest
              imagePullPolicy: "Always"
              command: ["sentimentbot"]
          restartPolicy: Never
      backoffLimit: 2
