apiVersion: batch/v1
kind: Job
metadata:
  name: data-loader
spec:
  template:
    spec:
      containers:
      - name: data-loader
        image: josiahwolfoberholtzer/on-exactitude-in-science-api:latest
        imagePullPolicy: Always
        env:
        - name: DATASET_YEAR
          value: "2020"
        - name: DATASET_MONTH
          value: "10"
        - name: DATASET_DAY
          value: "01"
        - name: SKIP_DOWNLOADING
          value: "true"
        command:
        - /run.sh
        volumeMounts:
        - mountPath: /data
          name: data
        - mountPath: /run.sh
          name: data-loader-script
          subPath: run.sh
      restartPolicy: Never
      volumes:
      - name: data
        persistentVolumeClaim:
          claimName: data-loader-data-pvc
      - name: data-loader-script
        configMap:
          defaultMode: 0777
          name: data-loader-script
  backoffLimit: 0
