apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: armycookbot
spec:
  schedule: "0 15 */2 * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: armycookbot
            image: registry.gitlab.com/btbtravis/army-cook:0.0.6.alpha.1
            volumeMounts:
            - name: master-txt-volume
              mountPath: /txts/master
            - name: sayings-txt-volume
              mountPath: /txts/sayings
            env:
            - name: CONSUMER_KEY
              valueFrom:
                configMapKeyRef:
                  key: CONSUMER_KEY
                  name: armycook-config
            - name: CONSUMER_SECRET
              valueFrom:
                configMapKeyRef:
                  key: CONSUMER_SECRET
                  name: armycook-config
            - name: ACCESS_TOKEN
              valueFrom:
                configMapKeyRef:
                  key: ACCESS_TOKEN
                  name: armycook-config
            - name: ACCESS_TOKEN_SECRET
              valueFrom:
                configMapKeyRef:
                  key: ACCESS_TOKEN_SECRET
                  name: armycook-config
            - name: ORIGIN_DATE
              valueFrom:
                configMapKeyRef:
                  key: ORIGIN_DATE
                  name: armycook-config
          restartPolicy: Never
          volumes:
          - name: master-txt-volume
            configMap:
              name: master-txt
          - name: sayings-txt-volume
            configMap:
              name: sayings-txt
