apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: gbv-adopt-update-ads-vlab
  labels:
    app: gbv-adopt-update-ads-vlab
spec:
  schedule: 0 0,8,16 * * *
  jobTemplate:
    spec:
      activeDeadlineSeconds: 28800 # 8 hours
      template:
        spec:
          restartPolicy: OnFailure
          containers:
          - name: gbv-adopt-update-ads
            image: vlabresearch/adopt:v0.0.89
            args:
            - python
            - malaria_ads.py
            resources:
              requests:
                cpu: 10m
                memory: 50Mi
            envFrom:
            - secretRef:
                name: gbv-adopt-envs
            env:
            - name: CHATBASE_DATABASE
              value: chatroach
            - name: CHATBASE_USER
              value: adopt
            - name: CHATBASE_PASSWORD
            - name: CHATBASE_HOST
              value: gbv-cockroachdb-public
            - name: CHATBASE_PORT
              value: "26257"
