---
pipeline:
  name: windobserverii_cron_daily_and_date_control
transform:
  image: us-central1-docker.pkg.dev/neon-shared-service/neonscience/neon-is-date-cntl:v1.0.0
  cmd: ["/bin/bash"]
  env:
    # START_DATE ("YYYY-MM-DD") and END_DATE ("YYYY-MM-DD") indicate the max date range (inclusive) to create the /Y/M/D folder structure
    # If START_DATE is not set (remove line entirely to unset), the start_date and/or the kafka_start_date for each site will be used, as indicated in the site-list json file
    # start_date field in the site-list file is the earliest date to pull data from a site
    # kafka_start_date in the site-list file is the first full day from which data began streaming via Kafka
    # END_DATE can be set or unset (remove line entirely to unset). If unset, end date will be yesterday. 
    OUT_PATH: /pfs/out
    START_DATE: "2024-01-31" # Inclusive
    #END_DATE: "2023-09-30" # Inclusive
    SOURCE_TYPE: "windobserverii"
  stdin:
  - "#!/bin/bash"
  - ./cron_daily_and_date_control/populate_site_dates.sh
input:
  cross:
  # This cron is the central driver for daily scheduled updates, such as data ingest and metadata loaders.
  - cron:
      name: tick
      spec: "0 7 * * *" # Run at 00:00 MST (07:00 GMT)
      overwrite: true
  - pfs:
      name: SITE_FILE
      repo: windobserverii_site_list
      glob: /site-list.json
resource_requests:
  memory: 100M
  cpu: 1
resource_limits:
  memory: 300M
  cpu: 1.5
sidecar_resource_requests:
  memory: 500M
  cpu: 0.5
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"
    }  
  ] }
