---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: tus-php-server-expiration-job
spec:
  schedule: "0 0 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          volumes:
            - name: uploads
              persistentVolumeClaim:
                claimName: pvc-tus-php-uploads
          restartPolicy: OnFailure
          containers:
          - name: tus-php-server-expiration-job
            image: tus-php-server-k8s
            imagePullPolicy: Never
            command: ['bin/tus', 'tus:expired', 'redis']
            volumeMounts:
              - name: uploads
                mountPath: /var/www/uploads
                readOnly: false
