apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: compute-new
spec:
  schedule: "0 * * * *"
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: compute-new
            image: gcr.io/poetic-genius-233804/metrics-flask:latest
            imagePullPolicy: Always
            command: ["python",  "compute_new.py"]
            env:
              - name: AWS_ACCESS_KEY_ID
                valueFrom:
                  secretKeyRef:
                    name: aws-credentials
                    key: aws_access_key_id
              - name: AWS_SECRET_ACCESS_KEY
                valueFrom:
                  secretKeyRef:
                    name: aws-credentials
                    key: aws_secret_access_key
          restartPolicy: Never
          activeDeadlineSeconds: 10000
