apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: quote-messenger
  namespace: quotes
spec:
  schedule: "30 7 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: quote-messanger
              image: loganballard/quote-msg-arm:prod
              command: ["/dist/quoteCats"]
              env:
                - name: TWILIO_AUTH
                  valueFrom:
                    secretKeyRef:
                      name: twilio-auth
                      key: id
                - name: PHONE_NUMBERS
                  valueFrom:
                    secretKeyRef:
                      name: phone-numbers
                      key: numbers
                - name: TZ
                  value: "America/Los_Angeles"
              imagePullPolicy: Always
          restartPolicy: OnFailure
      backoffLimit: 2
