apiVersion: batch/v1
kind: Job
metadata:
  name: seed
spec:
  backoffLimit: 10
  template:
    metadata:
      name: seed
    spec:
      containers:
        - name: seed
          image: rsachdeva/illuminatingdeposits.seed:v1.4.0
          imagePullPolicy: IfNotPresent
          command:
            - "bash"
            - "-c"
            - "./dbcli migrate && ./dbcli seed"
          envFrom:
            - configMapRef:
                name: postgres-config-deposits
          env:
            - name: POSTGRES_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: postgresql
                  key: postgresql-password
      restartPolicy: Never
