apiVersion: batch/v1
kind: Job
metadata:
  name: trollsearch-import-job-russia-jan-2019
spec:
  template:
    spec:
      containers:
        - name: trollsearch-backend
          image: politiwatch/trollsearch:latest
          imagePullPolicy: Always
          command:
            [
              "sh",
              "/backend/import/run.sh"
            ]
          resources:
            requests:
              cpu: "1"
              memory: 2Gi
              ephemeral-storage: 20Gi
          env:
          - name: MONGODB_HOST
            value: "mongodb://trollsearch-mongodb-0.trollsearch-mongodb-service:27017/trollsearch"
          - name: ARCHIVE_URL
            value: "https://storage.googleapis.com/twitter-election-integrity/hashed/2019_01/russia_201901_1/russia_201901_1_tweets_csv_hashed.zip"
          - name: FILE_NAME
            value: "russian_linked_tweets_csv_hashed.csv"
          - name: ARCHIVE_CODE
            value: russia_jan_2019
      restartPolicy: Never
      tolerations:
      - key: kubernetes.azure.com/scalesetpriority
        value: spot
        effect: NoSchedule
