apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: r-wallstreetbets-scores
spec:
  schedule: "0 * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:          
          - name: wallstreetbets-scores-scraper
            image: gcr.io/beneath/examples-wallstreetbets-scores-scraper:latest
            env:
              - name: BENEATH_SECRET
                valueFrom:
                  secretKeyRef:
                    name: r-wallstreetbets-scores-scraper
                    key: beneath-secret
              - name: REDDIT_CLIENT_ID
                valueFrom:
                  secretKeyRef:
                    name: r-wallstreetbets-scores-scraper
                    key: reddit-client-id
              - name: REDDIT_CLIENT_SECRET
                valueFrom:
                  secretKeyRef:
                    name: r-wallstreetbets-scores-scraper
                    key: reddit-client-secret
          restartPolicy: OnFailure
