apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: crawler
  namespace: production
spec:
  schedule: "30 2 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: crawler
              image: crimsy/crawler:production
              env:
                - name: API_KEY
                  valueFrom:
                    secretKeyRef:
                      name: backend-api-key
                      key: api-key
          restartPolicy: OnFailure
          imagePullSecrets:
            - name: docker-hub-crimsy
