apiVersion: batch/v1
kind: CronJob
metadata:
  name: database-refresher
spec:
  schedule: "0 2 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: database-refresher
            image: johnlemmon/database-refresher
            command: ["/bin/sh", "/harvester.sh"]
            volumeMounts:
            - name: config
              mountPath: /var/lib/harvester/config
              readOnly: true
          volumes:
          - name: config
            configMap:
              name: webapp-config
          restartPolicy: Never
