---
pipeline:
  name: csat3_calibration_assignment
transform:
  cmd: ["/bin/bash"]
  stdin:
  - "#!/bin/bash"
  - export ERR_PATH="/pfs/out/errored_datums$FILE_YEAR"
  - Rscript
      ./flow.cal.asgn.R
      DirIn=$DIR_IN
      DirOut=/pfs/out
      DirErr=$ERR_PATH
      FileYear=$FILE_YEAR
  image: quay.io/battelleecology/neon-is-cal-asgn-r:d2426683
  image_pull_secrets:
  - battelleecology-quay-read-all-pull-secret
  env:
    LOG_LEVEL: INFO
input:
  cross:
  - pfs:
      name: DIR_IN
      repo: csat3_calibration_loader
      glob: /csat3/*
  - pfs:
      name: FILE_YEAR
      repo: csat3_data_years
      glob: /data_year*.txt
parallelism_spec:
  constant: 4
resource_requests:
  memory: 1.0G
  cpu: 1.0
autoscaling: true
scheduling_spec:
  node_selector:
    cloud.google.com/gke-ephemeral-storage-local-ssd: "true"
    nodepool.neonscience.org/pipeline: "yes"
    cloud.google.com/gke-spot: "true"
pod_spec: |-
  { "tolerations": [
    {
      "key": "nodepool.neonscience.org/pipeline",
      "operator": "Exists"
    },
    {
      "effect": "NoSchedule",
      "key": "cloud.google.com/gke-spot",
      "operator": "Exists"
    }  
  ] }
pod_patch: |-
  [
    { "op": "replace",
      "path":"/containers/1/resources/requests/memory",
      "value":"500M"
    },
    { "op": "replace",
      "path": "/containers/1/resources/requests/cpu",
      "value": "1"
    }
  ]

