apiVersion: batch/v1
kind: Job
metadata:
  generateName: fastqc-
  namespace: biojobs
spec:
  ttlSecondsAfterFinished: 600
  activeDeadlineSeconds: 3600
  template:
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: nodegroup
                operator: In
                values:
                - spot_small
      containers:
      - name: fastqc
        image: ${AWSID}.dkr.ecr.${REGION}.amazonaws.com/fastqc
        resources:
          requests:
            memory: "4Gi"
            ephemeral-storage: "250Gi"
            cpu: "1"
          limits:
            memory: "12Gi"
            ephemeral-storage: "250Gi"
            cpu: "1"
        env:
          - name: FASTQ
            value: "${INPUT_FILEPATH}"
          - name: OUTPUT_PATH
            value: "${OUTPUT_FILEPATH}"
      restartPolicy: Never
  backoffLimit: 2