apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: gitter
  namespace: crdsdev
  labels:
    app: doc
spec:
  schedule: "@hourly"
  jobTemplate:
    spec:
      backoffLimit: 0
      template:
        spec:
          containers:
          - name: gitter
            image: crdsdev/doc-gitter:latest
            env:
            - name: REDIS_HOST
              valueFrom:
                secretKeyRef:
                  name: doc-redis
                  key: endpoint
            - name: REPOS
              valueFrom:
                configMapKeyRef:
                  name: doc-repos
                  key: repos
          restartPolicy: Never