---
pipeline:
  name: tchain_structure_repo_by_location
transform:
  cmd:
  - Rscript
  - ./flow.loc.repo.strc.R
  - DirIn=$DIR_IN
  - DirOut=/pfs/out
  - DirErr=/pfs/out/errored_datums
  - Comb=TRUE
  image: quay.io/battelleecology/neon-is-loc-repo-strc-r:aa651ed4
  image_pull_secrets:
  - battelleecology-quay-read-all-pull-secret
  env:
    LOG_LEVEL: INFO
    PARALLELIZATION_INTERNAL: '1' # Parallelization within R. If increased, adjust resource requests appropriately.
input:
  pfs:
    name: DIR_IN
    repo: tchain_calibrated_location_group
    glob: /tchain/*/*/*
parallelism_spec:
  constant: 1
resource_requests:
  memory: 500M
  cpu: 0.2
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": "0.2"
    }
  ]
