---
apiVersion: batch/v1
kind: CronJob
metadata:
  name: minecraft-update-bot
  namespace: default
spec:
  schedule: ""
  concurrencyPolicy: "Forbid"
  successfulJobsHistoryLimit: 3
  failedJobsHistoryLimit: 5
  jobTemplate:
    spec:
      backoffLimit: 3
      ttlSecondsAfterFinished: 300
      template:
        spec:
          restartPolicy: Never
          containers:
            - name: minecraft-update-bot
              image: ghcr.io/mrmarble/minecraft-update-go:v1.6.1
              env:
                - name: MINE_OUTPUT
                  value: /config
              envFrom:
                - secretRef:
                    name: minecraft-update
              volumeMounts:
                - mountPath: /config
                  name: minecraft-config-v1
          volumes:
            - name: minecraft-config-v1
              persistentVolumeClaim:
                claimName: minecraft-config-v1
