apiVersion: v1
kind: Pod
metadata:
  name: x3-c2-wofs-add-to-alchemist
  labels:
    app: x3-c2-wofs-add-to-alchemist
  annotations:
    iam.amazonaws.com/role: deafrica-ec2-s3_access
spec:
  containers:
  - name: x3-c2-wofs-add-to-alchemist
    image: opendatacube/datacube-alchemist
    #args: ["/usr/bin/env", "sleep", "10000"]
    #args: [ "datacube-alchemist", "addtoqueue" , "'time in 2018-12'"]
    args: [ "datacube-alchemist", "addtoqueue", "time in 2019"]
    resources:
      requests:
        cpu: 1
        memory: 8192Mi
      limits:
        memory: 8192Mi
    tty: true
    stdin: true
    env:
    - name: AWS_DEFAULT_REGION
      value: us-west-2
    - name: ALCHEMIST_ADDTOQUEUE_MESSAGE_QUEUE
      value: "alchemist-standard"
    - name: ALCHEMIST_ADDTOQUEUE_ENVIRONMENT
      value: "datacube"
    - name: ALCHEMIST_ADDTOQUEUE_CONFIG_FILE
      value: "https://raw.githubusercontent.com/digitalearthafrica/DEAfrica_scripts/master/alchemist_config/DEAfrica_wofs_c2_no_dsm.yaml"
      #value: "s3://test-results-deafrica-staging-west/test_configs/DEAfrica_ls8_fc_config.yaml"
    - name: DB_USERNAME
      valueFrom:
        secretKeyRef:
          name: collection2-datacube
          key: postgres-username
    - name: DB_PASSWORD
      valueFrom:
        secretKeyRef:
          name: collection2-datacube
          key: postgres-password
    - name: AWS_ACCESS_KEY_ID
      valueFrom:
        secretKeyRef:
          name: aws-service-process-data
          key: aws-data-access-key
    - name: AWS_SECRET_ACCESS_KEY
      valueFrom:
        secretKeyRef:
          name: aws-service-process-data
          key: aws-process-data-secret-key
    - name: DATACUBE_CONFIG_PATH
      value: "/opt/custom-config.conf"
    - name: DB_DATABASE
      value: "collection2"
    - name: DB_HOSTNAME
      value: "database.local"
    - name: DB_PORT
      value: "5432"
    - name: LOG_LEVEL
      value: "INFO"
  nodeSelector:
    beta.kubernetes.io/os: linux
  restartPolicy: Never