apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: daily-renderstatic
spec:
  schedule: "*/30 * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: daily-renderstatic
            image: us.gcr.io/fir-oss/static-renderer:latest
            # Create secret with
            # kubectl create secret generic fbtoken --from-literal=fbtoken=(TOKENVALUE)
            env:
              - name: FIREBASE_TOKEN
                valueFrom:
                  secretKeyRef:
                    name: fbtoken
                    key: fbtoken
          restartPolicy: OnFailure
