apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: parlameter-update-flow
spec:
  schedule: "0 2 * * *"
  successfulJobsHistoryLimit: 1
  failedJobsHistoryLimit: 2
  jobTemplate:
    spec:
      backoffLimit: 1
      template:
        spec:
          containers:
          - name: run-parser-flow
            image: parlaparser-ajdovscina
            env:
              - name: DJANGO_SETTINGS_MODULE
                value: parladata_project.settings.k8s
              - name: PARSER_MANDATE_START_DATE
                value: '2018-12-15'
              - name: PARSER_MAIN_ORG_ID
                value: '2'
              - name: PARSER_MANDATE_ID
                value: '1'
            envFrom:
              - secretRef:
                  name: parladata-credentials
              - secretRef:
                  name: parlaparser-ajdovscina-credentials
            resources:
              requests:
                memory: 1Gi # OOMKilled
                cpu: 300m
              limits:
                memory: 1Gi # OOMKilled
                cpu: 300m
          restartPolicy: Never
